Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to create clone of any object using jQuery?

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


Please Help Members By Posting Answers For Below Questions

Explain .on()? : jquery mobile

774


Explain jquery filter?

1103


What are the advantages of jQuery?

783


Can you please explain the difference between parent() and parents() methods in jquery? : jquery mobile

710


What are the different types of selectors?

799


Does jquery follow w3c recommendations?

794


What is serialize() in jquery?

738


What is jquery toggle function?

811


Can you please explain the difference between event.preventdefault and "return false"? : jquery mobile

766


Can we include multiple version of jquery? : jquery mobile

717


How to write cookies in jquery?

3968


How you will use jquery means requirement needed for using jquery.

743


How We Can Write Code Specific To Browser In Jquery?

770


What is CDN?

805


What is ajax and how it works?

781