How do I programmatically abort a jQuery drag operation?
Using jQuery UI, the user begins a drag operation. While dragging, an asynchronous event occurs that causes the dragged element to be deleted (a timer-based refresh, for example). In the refresh, I would like to do something like this before the refresh to avoid errors from the deleted element :
element.trigger('dragstop');
But that didn't seem to work.
This can be done by using the callback function (returning false) of the drag or drop event. See http://jqueryui.com/demos/draggable/#event-drag