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 a cdn? : jQuery Mobile
With jquery which operating system is more compatible?
Tell me do I need to add the jquery file both at the master page and content page as well?
How to programmatically trigger a click event that's being handled by jquery?
Change the url for a hyperlink using jquery?
What are the the two types of cdns?
What are the various ajax functions?
What are the types of selectors in jQuery?
What is the goal of cdn and what are the advantages of using cdn?
How JavaScript and jQuery are different?
How we can modify the css class in jquery?
What is the difference between onload() and document.ready() function used in jquery?