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

How to create, read and delete cookies with jquery?

867


What are jquery plugins?

817


What is the difference between find and children methods?

859


Is jquery library used for server scripting or client scripting?

773


What are the advantages of using cdn?

814


Jquery can be used in what scenarios?

783


In what scenarios jQuery can be used?

894


What is jquery.length? : jquery mobile

827


What is eq()? : jquery mobile

900


What are all the ways to include jQuery in a page?

800


Will Events Are Also Copied On Clone In Jquery?

772


Explain deferred and promise object in jquery? : jquery mobile

778


Explain the common methods of sending a request to a server.

792


How to execute jQuery code after the DOM is ready?

822


Define the script build up by jquery?

857