[jQuery] Events are not cloned together with the object
Hi,
Just got back to work, and got the snippet below
-----xhtml
<div id="fileqa_submit">
<div class="fileset">
<div><label>File</label><input size="96"
type="file"/></div>
<div><label>Description</label><textarea></textarea></div>
<a href="javascript:;" style="" class="cloneMe">Clone
me</a>
</div>
</div>
-----jquery
// clone this file upload section
$('.cloneMe').click(function(){
$(this).parent().clone().appendTo('#fileqa_submit').slideDown('slow');
});
At the beginning you'd have one section $('.fileset') so when you click
on $(.cloneMe) it clones whole $(' div.fileset') and appends it at the
end of '#fileqa_submit'.
The problem is $(.cloneMe) event on the original is not cloned together.
In other words aim here is to let cloned objects to be able to clone
themselves.
Cheers,
K
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of Dave Methvin
Sent: Friday, 27 October 2006 2:02 AM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Events are not cloned together with the object