Is it possible to loop through a data() object?
data()
Suppose this is my code:
$(\'#mydiv\').data(\'bar\',\'lorem\'); $(\'#mydiv\').data(\'f
Tested with jQuery 1.4 and tips from @user292614 the following works:
$('#mydiv').data('bar','lorem'); $('#mydiv').data('foo','ipsum'); $('#mydiv').data('cam','dolores'); $.each( $('#mydiv').data(),function(i, e) { alert('name='+ i + ' value=' +e); });