Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <div id="first">First</div> <div id="second">Second</div> <script> // no need to call remove second.after(first); // take #second and after it insert #first </script> </body> </html>