Answer Posted / 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 |
Post New Answer View All Answers
Why use jQuery filter() Methods?
How is body onload() function is different from document.ready() function used in jquery?
What is the use of queue() in jquery?
How we can hide a block of html code on a button click using jquery?
explain width() vs css(‘width’) in jquery
Tell me how do you stop the currently-running animation? : jquery mobile
What is the difference between jquery-x.x.x.js and jquery.x.x.x min.js?
How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?
Difference Between Prop and Attr in jQuery?
What is queue() in jquery?
Tell me how to check data type of any variable in jquery? : jquery mobile
How to call a method inside code-behind using jquery?
Explain the use of the .pushstack() method.
Mac, windows or linux? Why do you love this platform while using jquery?
What is .detach()? : jquery mobile