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
Differentiate between width() vs css(‘width’) in jquery
Explain the features of jquery?
Tell me how to select combobox select value and text using jquery?
How do I pull a native DOM element from a jQuery object?
Explain remove class jquery with example?
Tell me how to disable jquery animation? : jquery mobile
What is the use of html() method in jquery?
What are the different ways of using $.connect function in jquery?
Tell me is jquery a w3c standard? : jquery mobile
What are jquery plugins?
How to prevent Right Click option using jquery?
Which version of jquery file should be used?
What are the the two types of cdns?
Can there be more than one ready function in jquery?
Define .siblings() method in jquery?