Friday, January 30, 2015

How to move an element into another element?

Moving:

$("#NodesToMove").detach().appendTo('#DestinationContainerNode');

Copying:

$("#NodesToCopy").appendTo('#DestinationContainerNode')

Note: .detach() use. When copy be careful do not duplicate id's.

http://stackoverflow.com/questions/1279957/how-to-move-an-element-into-another-element

No comments: