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 are the difference between alert() and confirm()?
What are some of the ways to provide effects? : jQuery Mobile
What are the advantages of minified version of jquery?
What is jquery.noconflict? Explain
Can we call c# codebehind method using jquery?
What is the purpose of fadetoggle() method in jquery?
What are the two types of CDNs?
What does $("P") will select?
What is a jquery ajax?
What are selectors in jQuery and how many types of selectors are there?
How can you disable jquery animation?
Can we call C# code behind using jQuery?