[jQuery] Re: Iterating through .data() elements...

2008-12-12 Thread ricardobeat
There are other alternatives: 1. Store everything as an object in data() $(element).data('yourdata',{mydata1:'something, mydata2:'something'}) var data = $(element).data('yourdata'); $(element).data('yourdata', $.extend(data, { mydata3:'something' }); Then you can iterate over that obje

[jQuery] Re: Iterating through .data() elements...

2008-12-11 Thread Ariel Flesler
You mean this: http://dev.jquery.com/ticket/3539 You're right indeed, I forgot queue was blindly executing any queued data. I was sure it'd only do that for fx queues. I was confusing it with my patch. So yes, queuing is only good for functions for now, we'll hopefully have a nicer queuing syste

[jQuery] Re: Iterating through .data() elements...

2008-12-11 Thread Nick
Also, I should mention (as I see a patch request for exposing queue) that I am working on a fairly large framework and patching in an update for one module of the site is not an easy task nor something I want to approach someone with at this time. We are using a more recent version of JQuery, but

[jQuery] Re: Iterating through .data() elements...

2008-12-11 Thread Nick
queue as in effect queue? I'm not finding any documentation on queue except as used for effects and your sample seems to put items in a queue as if I had to execute things in order. That's not what I'm looking for. I need to store key/value pairs to specific elements on the page for nav request

[jQuery] Re: Iterating through .data() elements...

2008-12-11 Thread ricardobeat
Hi Ariel, Is there any documentation for this use of queue(), or could you give me a brief explanation? thanks :) - ricardo On Dec 11, 10: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() w

[jQuery] Re: Iterating through .data() elements...

2008-12-11 Thread Jake Rutter
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(){ });

[jQuery] Re: Iterating through .data() elements...

2008-12-11 Thread Ariel Flesler
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 w