I want the user to be able to trigger sorting mode. It’s because I find that with long lists, updating takes long. If updating the position happens every time an item is dropped, it’d be slow and expensive.
This means that when they trigger the sorting mode, let’s say by clicking on Start sorting, that’s when I apply the .sortable(...) to the list I want them to sort.
My problem lies in these:
- How do I disable the automatic update after everytime an item is dropped?
- If the user decides that they don’t want to sort it after all, how do I cancel it?
Thanks!
If you have a button that you want to use to “Start Sorting” the sortable, I would recommend this approach, assuming you have a DIV with an ID of “MyList”…
On document load or Init, create the sortable and deactivate it…
Then when the user clicks the “Start Sorting” button…
At this point I would prefer to change the “Start Sorting” button to “Finish Sorting”, and when this button is clicked…
I know this is an old question so I point out that this uses the latest JQuery as described here. I am not sure what the minimum version is that would allow for this to work.