[jQuery] Re: storing objects in jQuery data

2009-01-07 Thread gibble
I actually found this while waiting for this message to be approved to the list, what I ended up using was a slight modification so it does a deep clone/copy var aCopy = jQuery.extend(true, {}, $('#something option:first').data ('value')); dave.methvin wrote: > > >> Is there a way to get jus

[jQuery] Re: storing objects in jQuery data

2009-01-06 Thread Dave Methvin
> Is there a way to get just a copy of the data, not the reference to the data > itself? You could use something like this: var aCopy = jQuery.extend({}, $('#something option:first').data ('value')); Since extend returns its first argument, you'd get the a new object with all the data values co