unsubscribe me please
On Dec 11, 2008, at 7:28 PM, Ariel Flesler wrote:
>
> You need to use $().queue() not data.
>
> $().queue('foo',1).queue('foo',2).queue('foo',3)
>
> Also, $().queue('foo').each() won't work because the returned data is
> an array.
>
> $.each($().queue('foo'), function(){ }); will work.
>
>
> --
> Ariel Flesler
> http://flesler.blogspot.com/
>
> On Dec 11, 7:42 pm, Nick <nschub...@gmail.com> wrote:
>> 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.