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 |
What is jquery.noconflict? Explain
Explain the types of selectors in jquery?
What is the minimum setup needed to start using jquery.
What is a use of jquery filter?
What are features of jquery or what can be done using jquery?
Define the use of each function in jquery?
What features of jquery, has been used in web applications?
Which one is more efficient, document.getelementbyid( "idname") or $("#idname)?
Explain slidetoggle() effect.
Mention the advantages of cdn? : jQuery Mobile
What are the methods used to provide effects?
Why we use jquery .each() function?