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?



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

Answer / 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

More jQuery Interview Questions

How you get server response from an ajax request using jquery?

0 Answers  


Why is jquery better than javascript?

0 Answers  


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

0 Answers  


How do you stop the currently-running animation?

1 Answers  


Difference between parent() and parents() in jQuery?

0 Answers  


Explain the difference between parent() and parents() methods in jquery? : jquery mobile

0 Answers  


What is the difference between jquery-x.x.x.js and jquery.x.x.x min.js?

0 Answers  


How do you check if an element exists or not in jQuery?

1 Answers  


What is queue() in jquery? Use of queue() in jquery?

0 Answers  


What are the difference between alert() and confirm()?

0 Answers  


Whether jQuery HTML work for both HTML and XML documents?

0 Answers  


Explain finish method in jquery? : jquery mobile

0 Answers  


Categories