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 |
Differentiate between jquery.size and jquery.length? : jQuery Mobile
What are the the two types of cdns?
Explain the difference between onload() and document.ready() function used in jquery?
With jquery which operating system is more compatible?
What is .empty()? : jquery mobile
Which is the fastest selector in jQuery?
Please tell us that is jquery knockkout intended to compete with jquery or prototype or work with it?
Why is only the first page of multi page document loaded? : jquery mobile
What is the use of queue() in jquery?
What is $() in jquery?
Which one is more efficient, document.getElementbyId( "myId") or $("#myId)?
How to write browser specific code using jquery? : jquery mobile