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 you get server response from an ajax request using jquery?
Why is jquery better than javascript?
explain width() vs css(‘width’) in jquery
How do you stop the currently-running animation?
Difference between parent() and parents() in jQuery?
Explain the difference between parent() and parents() methods in jquery? : jquery mobile
What is the difference between jquery-x.x.x.js and jquery.x.x.x min.js?
How do you check if an element exists or not in jQuery?
What is queue() in jquery? Use of queue() in jquery?
What are the difference between alert() and confirm()?
Whether jQuery HTML work for both HTML and XML documents?
Explain finish method in jquery? : jquery mobile