Does events are also copied when you clone any element in jQuery?



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

Post New Answer

More jQuery Interview Questions

What are the difference between alert() and confirm()?

0 Answers  


What are some of the ways to provide effects? : jQuery Mobile

0 Answers  


What are the advantages of minified version of jquery?

0 Answers  


What is jquery.noconflict? Explain

0 Answers  


Can we call c# codebehind method using jquery?

0 Answers  






What is the purpose of fadetoggle() method in jquery?

0 Answers  


What are the two types of CDNs?

0 Answers  


What does $("P") will select?

0 Answers  


What is a jquery ajax?

0 Answers  


What are selectors in jQuery and how many types of selectors are there?

1 Answers  


How can you disable jquery animation?

0 Answers  


Can we call C# code behind using jQuery?

0 Answers  


Categories