I have a block of html that I want to move from one div to another div on the page using javascript. I am writing a function that will move this code block and will have no idea if, or how many, dropdown lists exist as it will be different every time. My problem is that when I do a .clone(true, true) with JQuery, the dropdownlist either stops opening or it opens with a width of 0 in the upper left corner of the screen. How do I fix this?
Task: Move everything from block1 to block2.
<div id="block1">
<p>Hi! I'm a paragraph.</p>
<select id="select1"></select>
The select was already initialized with JS and works fine.
</div>
<div id="block2">
</div>