I have a situation whereby I have a series of connected sortable lists, and a list can have no more than 2 items at any one time.
Therefore I need to somehow disable the "full" list, but still allow an item to be dragged away from it.
// If this list has two items, disable it, otherwise enable it
if ($('li', this).size()==2) {
$(this).addClass('ui-state-disabled');
} else {
$(this).removeClass('ui-state-disabled');
}
I need to somehow disable the full ul as a drop target.
Any ideas would be hugely appreciated.