[jQuery] Re: data object not included in clone?

2009-03-02 Thread sliver

If cloning does not copy the associated data objects, how can you do a
complete copy all associated data objects to the cloned element?

On Mar 1, 2:05 pm, sliver sliver2...@gmail.com wrote:
 When cloning and element, you can pass a boolean value of true to copy
 event handlers... what about the data object from jQuery?

 console.log($('div/').data('foo', 'bar').clone(true).data('foo')); --

  undefined


[jQuery] Re: data object not included in clone?

2009-03-02 Thread sliver

I've searched around quite a bit... and maybe I am missing the
appropriate key words, but I don't see a jquery method for copying/
retrieving all associated data objects from an element.

On Mar 2, 8:41 am, sliver sliver2...@gmail.com wrote:
 If cloning does not copy the associated data objects, how can you do a
 complete copy all associated data objects to the cloned element?

 On Mar 1, 2:05 pm, sliver sliver2...@gmail.com wrote:

  When cloning and element, you can pass a boolean value of true to copy
  event handlers... what about the data object from jQuery?

  console.log($('div/').data('foo', 'bar').clone(true).data('foo')); --

   undefined