So I want a piece of code executed when a draggable is reverted because it wasn’t dropped on a droppable. Unfortunately return “invalid”; doens’t seem to work, revert is acting like revert:true;
Any suggestions how I can solve this?
revert: function () {
//do some extra stuff...
return 'invalid';
}
hemant is right insofar that
revertis not an event, it is an option, but its accepted values are not valid/invalid but true/false.See the jquery-ui-draggable manual which states: