I'm using JQuery UI to drag divs around a container and i want to fire an event when the user releases the mouse (stops dragging).
Any ideas on how to do this would be great. Thanks in advance
-Shawn
I'm using JQuery UI to drag divs around a container and i want to fire an event when the user releases the mouse (stops dragging).
Any ideas on how to do this would be great. Thanks in advance
-Shawn
If you're using jQuery UI, you have a built in function already:
http://docs.jquery.com/UI/Draggable#event-stop
$('.selector').draggable({
stop: function(event, ui) { ... }
});
If you're not using the Draggable function from the UI, I'd recommend you do so. It will make your life easier for this! It's already written!