views:

152

answers:

1

I'm trying to clone a draggable/resizable element with jQuery. The original element behaves as it should. When I clone it and then try to remove draggable and resizable via the 'destroy' call, it fails to remove the added classes and divs. You can see it in action (or inaction) at the following: jsbin example

One of the textareas should be draggable and resizable and the other should not. As you can see the behavior is anything but expected.

A: 

In the example you link to, you're creating two text areas with the same id. There is probably some drag-drop code that assumes that each element in the page has a unique id attribute. And in fact each element should.

PeterAllenWebb