I would like to move one DIV element inside another. For example, I want to move this (including all children):
...
>
If the div
where you want to put your element has content inside, and you want the element to show after the main content:
$("#destination").append($("#source"));
If the div
where you want to put your element has content inside, and you want to show the element before the main content:
$("#destination").prepend($("#source"));
If the div
where you want to put your element is empty, or you want to replace it entirely:
$("#element").html('...');
If you want to duplicate an element before any of the above:
$("#destination").append($("#source").clone());
// etc.