Wednesday 20 July 2011

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

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");

No comments:

Post a Comment