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...

Does events are also copied when you clone any element in jQuery?

Answer Posted / chaitanya

As explained in previous question, using clone() method, we can create clone of any element but the default implementation of the clone() method doesn't copy events unless you tell the clone() method to copy the events. The clone() method takes a parameter, if you pass true then it will copy the events as well.

Hide Copy Code

$(document).ready(function(){

$("#btnClone").bind('click', function(){

$('#dvClickme').clone(true).appendTo('body');

});

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you select all elements with the class of “selected” in jquery?

755


What are the guidelines for an application to follow the principles of progressive enhancement.

803


Can you write a jquery code to select all links inside the paragraph?

806


What is jquery.length? : jquery mobile

817


What are the advantages of method chaining in jquery?

783


What is the basic requirement to start with the jquery?

859


How to programmatically trigger a click event thats being handled by jquery only?

794


What is the use of delegate() method in jquery?

791


explain width() vs css(‘width’) in jquery

795


Define jquery filter?

823


What is jquery.holdready() function?

821


How to use jquery?

860


How to programmatically trigger a click event that's being handled by jquery?

842


How to read cookies in jquery?

783


How can related code be encapsulated?

837