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 |
How to increase cursor size in html body using jquery?
What is the need for jquery? : jQuery Mobile
Explain jquery $.ajax() method?
What methods used to provide effects?
How can you delay document.ready until a variable is set?
What does $("P") will select?
Does jQuery 2.0 supports IE?
How we can get the input value of an element using jquery?
Can there be more than one ready function in jquery?
What is .siblings() method in jquery?
What is the difference between the knockout and jquery?
What is wrong with this code line "$('#myid.3').text('blah blah!!!');"