I am trying to create a stage.
I have 5 items in a draggable div. There clones will be dragged to 20 droppable areas.
I have created 20 boxes of divs with different ids. Means multiple drop able areas.
The problem is that I don’t have the idea that how can I get id the of the div where the item is dropped and how, I will show that product only in that div. Right now it is displaying all of the items in a single first div.
The main problem is that how can we create multiple droppable areas dynamically and drop an item in that specific area.
Thanks in Advance
jQuery-UI Draggable Droppable event handler
You need to get the droppable dom object from the event arguments passed to the drop method.
the draggable object can be referenced through
ui.draggable. Most of this was taken from the jQuery-UI documentation found at the jQuery-ui WebsiteAdding Droppable to a Dynamically Added Element
In the event that the elements, let’s call them stage targets, are being added dynamically to the “stage” then you would want to call the
droppablemethod on those elements when they are created.If I have missed the spirit of your question please advise.