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 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 copied. > > -- View this message in context: http://www.nabble.com/storing-objects-in-jQuery-data-tp21318127s27240p21333235.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.