An absolutely common sortable case:
- Item
Sortable has a "cancel" capability invoked using sortable('cancel')
.
From the docs: "Cancels a change in the current sortable and reverts it to the state prior to when the current sort was started." See http://api.jqueryui.com/sortable/#method-cancel.
Example usage:
$("#sortable").sortable({
stop: function(e, ui) {
if ("I need to cancel this") {
$(ui.sender).sortable('cancel');
}
}
});