Clone( ) will not copy any event handlers attached to the cloned object. but clone(true) will copy event handlers attached too.
Example:Consider html code:
<b>Hello</b>
<p>, how are you?</p>
Now consider Script:
$('b').click(function () {
alert('Handler for .click() called.');
});This indicates that if we click on Hello, then the alert have to be fired.
Now
clone() Hello and add to paragraph:
$('b').clone().prependTo('p');Now if we click on the Hello added to Paragraph,it will not show any Alert message. Now use clone(true)
$('b').clone(true).prependTo('p');This will fire alert message even in Hello added to Paragraph.