jQuery loop through data() object

Posted by bartclaeys on Stack Overflow See other posts from Stack Overflow or by bartclaeys
Published on 2009-04-21T13:32:55Z Indexed on 2010/06/01 20:13 UTC
Read the original article Hit count: 210

Filed under:
|
|
|

Is it possible to loop through a data() object?

Suppose this is my code:

$('#mydiv').data('bar','lorem');  
$('#mydiv').data('foo','ipsum');  
$('#mydiv').data('cam','dolores');

How do I loop through this? Can each() be used for this?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about data