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

What is the purpose of fadetoggle() method in jquery?

712


What is resize() function in jquery?

872


Is it possible to use jquery to make ajax request? : jquery mobile

807


What are the four parameters used for jQuery Ajax method?

796


What is cdn and how jquery is related to it?

751


How can you use array with jquery?

783


Can you please explain the difference between javascript and jquery? : jquery mobile

727


How to get the server response from an ajax request using jquery?

793


Explain bind() vs live() vs delegate() methods.

790


What is .bind()? : jquery mobile

796


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

790


What are the two types of CDNs?

904


Can you please explain the difference between body onload() and document.ready() function? : jquery mobile

717


When can you use jquery?

779


How to select combobox select value and text using jquery?

754