how can you check which element your draggable item is hovering over? (JQuery)

У меня два списка. Первый состоит из перетаскиваемых элементов (например, , этот ). It is connected to the second, which is a sortable list (like this).

Items from the first list can be added to the second list by dragging them there. They are then cloned, and green so the user can see they're unsaved additions.

What I want to happen is when you drag an item out of the second list, it will be marked for deletion, or sent back to the first list (if it's an unsaved addition). However I also want people to be able to sort the second list.

So if they drag an item out and release the mouse, it's supposed to be removed. If they drag an item out and back in again, it's not supposed to be removed.

I've tried wrapping a mouseup handler inside of a sortout, with that I end up with it working, but then you can't sort items in the list.

Any ideas of where I should take this?

6
задан Lorenzo 21 December 2010 в 18:32
поделиться