JQuery sortable - disable a single item

I have several lists with draggable items. When the user moves any item to a new location, $ .ajax is called, so the server can record the change in the item in position. Although I can turn off sorting for the entire list, I really want to turn off sorting for the moved item until $ .ajax receives a success message.

update: function(event, ui) {
  ui.item.sortable('disable');
  $.ajax({options}, success: function() {
    ui.item.sortable('enable');
  });
}

I have done a lot of research so far, and you can turn off the whole list. Any suggestions on what I'm doing wrong, or is this not possible?

+2
source share
1 answer

Cancellation sort settings allow you to cancel call sorting using the selectors. I added the following line -

cancel:'.updating'

... and then I add and remove a class around the call to $ .ajax.

I don’t know how I missed that day yesterday. D /

+2
source

All Articles