Trying here to change the value of data-foo
Hi,
Im trying here to change the value of data-foo, but it doesn't work..
- <li class="jander" data-foo="bar1">Item</li>
- $( document ).ready(function() {
- $('li').attr('class','clander');
- $('li').data('foo', 'bar2');
- });