I have a page with a large number of jquery UI draggables and a large number of droppables. I wanted some custom logic to determine if a droppable would accept a certain draggable so i coded up some logic in the "accept" event of the droppable. It worked but one thing i noticed is that this event fires right when you start dragging an item and it fires for all droppables at that time.
That seems very inefficient. I was thinking it would right for a single droppable right when you hover but that doesn't seem to be the case. Is there any reason why you think its coded this way (as it seems very inefficent as if i have 100 droppables, its firing 100 times even if if the user only tries to drag into a single droppable) and also, is there any way to have the behavior that i want .
I thought of putting logic into the drop event to simple do my check and delete the draggable item (to simulate not accepting it) but the issue there is that you don't get any of that nice "revert' animation so it looks a bit inconsistent (compared the what you would see if you based on the accept event)
Any thoughts on how I can still plug in some custom logic but not waste the cycles to fire on every single droppable right when i move something (and still get the revert animation) ?