开发者

jQuery — Nested Sortables Plugin — Disabling sortability between parents

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 cal开发者_Go百科led for every new OL but that simple disables sorting for everything entirely.

Thanks for any help.


Just answered what is essentially an identical question here: jQuery UI: Only allow sortable within its own parent level, and not above or below

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜