Search code examples
javascriptjqueryjquery-uidroppable

How can I get the ID of the div that a draggable object which was just dropped on this USED to be dropped into?


I need something likt this:

$('#dropZOne').droppable({
  drop: function(ui,event) 
        {
          $($(ui).getPreviousDropZone()).droppable('options',{disabled:false});
        }
});

I hope my fake method is illustrative enough of what I need!


Solution

  • Can you record the location it came from when the drag starts, or when the page loads? It's hard to tell with whats provided, but that would be my suggestion.

    IE - Page loads... store the droppable item the item is in (if it is in one) On every drop, retrieve the "from" information, then record the new from location for the next drag, if thats the way you want it to work.