> var foo = $('#foo').clone(true);
> $('#foo').remove();
> foo.appendTo('somewhere else later')
Kludgy, inefficient, and ineffective (if there are references to the
original element elsewhere).
However, I guess another way around would be to use a storage node/
fragment and append the removed elements to it - like so:
var offlineStore = $('<div />');
$(elementsToRemove).appendTo( offlineStore );
Although "understandable" or "elegant" are hardly words that spring to
mind. :)
My initial guess was that there had to be an optional boolean argument
for `.remove()` to indicate when events and data shouldn't be stripped
away.
To my surprise, there wasn't.
--
Már Örlygsson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---