I would just delete the original sortable logic and apply a class attached to one sortable one. So, for example, you have three functions for two lists you sort. If one of them is sorted = disabled, delete the sort class with conenctWith parameters and apply one sort class to the list with which you were associated. If you need to stop it, then do the same with the other.
Example:
$('sortBoth').sortable({connectWith: $('.sortListToConnect)}); $('.sortList2').sortable(); $('.sortList3').sortable();
Delete or add a class to each list accordingly for how you need it to function. An easy way to handle this. I hope I quickly formulated this quite clearly. Happy coding :)
source share