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 |
In jquery, what is the meaning of toggle?
Is it possible that jquery html work for both html and xml document?
How can related code be encapsulated? Give example.
And finally, if you could give one tip to any new budding jquery ui developers, what would it be?
Which one is more efficient, document.getelementbyid( "idname") or $("#idname)?
What does dollar sign mean in jquery? : jQuery Mobile
Is jQuery is a client or server scripting?
Can you please explain the difference between javascript and jquery? : jquery mobile
What is event.stoppropagation? : jquery mobile
How do you select an item using css class or id and get the value by use of jquery.
What is slice() method in jquery?
Difference between javascript and jquery?