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 |
Explain source maps in jquery? : jquery mobile
Explain .empty() vs .remove() vs .detach() in jquery
How to check if number is numeric while using jquery 1.7+? : jquery mobile
Explain cache paremeter of jquery ajax method?
Which is fast document.getElementByID('txtName') or $('#txtName').?
List the basic selectors in jquery?
Can you please explain the difference between javascript and jquery? : jquery mobile
Where can we download JQuery?
How to include jQuery in ASP.Net project?
Explain remove class jquery with example?
Explain which program is useful for testing jquery?
How do you implement animation functionality?