Does anyone know how I can iterate through the elements stored in the
data element instead of referring to them individually?

Say I:
$(someObj).data('myData1', 'Here is some text')
.data('myData2', 'Here is some more text')
.data('myG', 'Here is some more text');

How could I loop through the data() object to get the key/value pairs
back if I didn't know the keys?

I tried:
$(someObj).data().each(function(i, val) { alert(i + ': ' + val); });

with no success.  I also tried variations of for loops and such.

Reply via email to