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 |
Tell me which command will give a version of jquery?
How to get the style property of an element using ?
What is $() in jquery library?
Can we add more than one ‘document.ready’ function in a page?
What are the difference between alert() and confirm()?
What is the difference between onload() and document.ready() function used in jquery?
Please tell us that is jquery knockkout intended to compete with jquery or prototype or work with it?
What is difference between onload and ready?
Back onto jquery ui' can you see jquery ui making more of an impression in the future, lead by the current successes of jquery?
What are the advantage of using minimized version of jquery?
Can you include multiple version of jQuery? If yes, then how they are executed?
Tell me how to check if number is numeric while using jquery 1.7+? : jquery mobile