Move Content Back And Forth With jQuery

Written by Saran on May 5, 2012, Updated October 12, 2015

This jQuery snippet comes in handy when you want to move text/HTML content back and forth, the function below uses "is:empty" to check if empty element, and moves content from one element to another using appendTo() method, hope it helps.

About Sanwebe.com

Sanwebe.com was founded in 2011 by Saran Chamling. A blog truely inspired by the ever changing web development world. It is a small effort to provide useful tips, tutorials and related resources to web developers.