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

Tell me how to use migrate jquery plugin if possible? : jquery mobile

0 Answers  


Mention the advantages of cdn? : jQuery Mobile

0 Answers  


Define type paremeter of jquery ajax method?

0 Answers  


what are the features of jquery

0 Answers  


Why there are two different version of jQuery library?

1 Answers  


How to include jQuery in ASP.Net project?

0 Answers  


Can we use our own specific character in the place of $ sign in jQuery?

1 Answers  


List the advantages of jquery?

0 Answers  


How to increase cursor size in html body using jquery?

0 Answers  


Is jQuery is a client or server scripting?

0 Answers  


What is the difference between $('div') and $('<div/>') in jQuery?

1 Answers  


How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?

0 Answers  


Categories