Evan4623
Evan4623

Reputation: 259

JQuery UI Droppable being destroyed when new droppable is created

Okay, I have a simple droppable on the page. When the user performs an action, a function is run and it creates a new droppable. Now the original droppable doesn't work anymore. The only way it will work is if the droppables all have the same class name, but then if I drop something in the original, it thinks I dropped it in the new one that was created. If I try to use unique names for the droppables, only the last droppable to be created works, any others beforehand do not. It seems like a simple issue, but I haven't been able to find anything on it.

Upvotes: 0

Views: 122

Answers (1)

Tim
Tim

Reputation: 5943

please have a look at the following fiddle: http://jsfiddle.net/eykgb/

You have to work with both, classes and IDs to active all droppables and to know on which one your draggable was dropped.

Upvotes: 1

Related Questions