How to create clone of any object using jQuery?
Answer / chaitanya
jQuery provides clone() method which performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes.
Hide Copy Code
$(document).ready(function(){
$('#btnClone').click(function(){
$('#dvText').clone().appendTo('body');
return false;
});
});
Is This Answer Correct ? | 1 Yes | 0 No |
What is the difference between jquery and javascript?
How do you update ajax response with id " resilts"?
Explain some benefits of jquery knockout?
Write a basic jquery code?
What are jquery plugins?
How to check or uncheck all checkboxes using jquery?
How can we add change font size using jquery?
Can we have multiple document.ready() function on the same page? : jquery mobile
How we can get the input value of an element using jquery?
Does jQuery 2.0 supports IE?
What is the purpose of jquery?
Different ways of using $.connect function in jquery?