I would like to move one DIV element inside another. For example, I want to move this (including all children):
<div id="source">
...
</div>
into this:
<div id="destination">
...
</div>
so that I have this:
<div id="destination">
<div id="source">
...
</div>
</div>
Best Answer
You may want to use the
appendTo
function (which adds to the end of the element):Alternatively you could use the
prependTo
function (which adds to the beginning of the element):Example: