Reputation: 5913
I am using jQuery UI's draggable and droppable The draggable elements are being set to snap to elements with a specific class
When the element is dropped, how do I select the element that is was be snapped to? I can't seem to find anything in the documnetation Thanks
Upvotes: 1
Views: 1480
Reputation: 5621
You have to catch the STOP event within the jQuery UI events list found here:
http://jqueryui.com/demos/draggable/#events
Example:
$( ".selector" ).draggable({
stop: function(event, ui) { $(this).parent()//you got it from here }
});
Upvotes: 1