jQuery — Nested Sortables Plugin — Disabling sortability between parents
- by AJB
I've got a question that I think is simple but I've not been able to figure it out.
This is in regard to this plugin: http://mjsarfatti.com/sandbox/nestedSortable/
Essentially, I want to disable the ability to sort children outside of their parents.
So, I've got this:
CATEGORY 1
ITEM 1.1
ITEM 1.2
ITEM 1.3
CATEGORY 2
ITEM 2.1
ITEM 2.2
ITEM 2.3
So, I'd like to provide the ability for users to sort the children within their category, and the ability to sort the categories themselves. But I want to disable the ability to move a child to another parent. (e.g. ITEM 1.1 cannot be moved to CATEGORY 2). And also I would like to disable the abilty to nest any parents in any children.
I tried setting it so that the 'nestedSortable' function is called for every new OL but that simple disables sorting for everything entirely.
Thanks for any help.