Move (Copy) Div From One Place To Another Using jQuery

Posted: July 21, 2011 in Jquery
Tags:

Hello Friends if you want to copy or move the data from one div to onther div you can do it easily with jquery.I can do it by creating new HTML and append it to Active records list. But i came to know about Clone functionality of jQuery, Which is best thing to move or copy any html element.

here are two possibility in Clone function of jQuery. If you want to keep the Div at their place and create the same Div at some other place than you can go for Clone. If you want to Move the Div from one place to another than use appendTo. Look at below syntax.

$(“div#source_div_id”).appendTo(“div#destination_div_id”);

About these ads
Comments
  1. [...] by HTML5 Data Attr Value (elijahmanor.com)Slider Kit, sliding contents with jQuery (kyrielles.net)Move (Copy) Div From One Place To Another Using jQuery (viralsolani.wordpress.com)var linkwithin_site_id=197701;var [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s