Javascript examples for jQuery Method and Property:appendTo
Move one content div into another div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.js"></script> </head> //w w w.j a v a2 s . c o m <body> <div id="1"> <script>console.log("test")</script> </div> <div id="2"></div> <script> $('#1').children().clone().appendTo('#2'); </script> </body> </html>