use jquery to take all element out of another element code example
Example 1: jquery move element
$("#source").appendTo("#destination");
Example 2: jquery move element to another without losing events
$('#element_to_move').appendTo('#PARENT_at_destination');