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 |
How to include jQuery in ASP.Net project?
Define bind() and unbind elements in jQuery?
What is the use of css() method in jquery?
What is jquery selectors?
What is the use of jQuery.ajax method ()?
How can we add change font size using jquery?
What is get()? : jquery mobile
Which are the fastest selectors in jquery? : jquery mobile
Difference Between Prop and Attr in jQuery?
Which operating system is more compatible with jQuery?
Explain each() function in jquery?
How do you select all elements with the class of “selected” in jquery?