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 |
Tell me how to use migrate jquery plugin if possible? : jquery mobile
Mention the advantages of cdn? : jQuery Mobile
Define type paremeter of jquery ajax method?
what are the features of jquery
Why there are two different version of jQuery library?
How to include jQuery in ASP.Net project?
Can we use our own specific character in the place of $ sign in jQuery?
List the advantages of jquery?
How to increase cursor size in html body using jquery?
Is jQuery is a client or server scripting?
What is the difference between $('div') and $('<div/>') in jQuery?
How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?