I am using jquery 1.3 ,
When i clone the element with clone(true) all the data + event are copied , but the problem is
to distinguish between event of the original html block and cloned html block.
When i tries to fire event to cloned html blocks then original html block’s event also get fired.
so now the big problem is how to distinguish between events
checkout the code over here jsfiddle.net/BbBqJ/1
When you have a selector like
$('.edit')for example, you are selecting all of that element on the page.To focus the selector to a limited context, you can pass a second argument. So what I did was to store the new element you created into a variable called
$box, and then passed that in as the context like$('.edit', $box).I made other changes to your code to clean things up too.
http://jsfiddle.net/sxkxp/1/
Again, just remember that a selector like
.editis affecting all those elements that exist on the page.