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
How to create, read and delete cookies with jquery?
What are jquery plugins?
What is the difference between find and children methods?
Is jquery library used for server scripting or client scripting?
What are the advantages of using cdn?
Jquery can be used in what scenarios?
In what scenarios jQuery can be used?
What is jquery.length? : jquery mobile
What is eq()? : jquery mobile
What are all the ways to include jQuery in a page?
Will Events Are Also Copied On Clone In Jquery?
Explain deferred and promise object in jquery? : jquery mobile
Explain the common methods of sending a request to a server.
How to execute jQuery code after the DOM is ready?
Define the script build up by jquery?