开发者

How can I stagger a Sortable list in JQUERY?

开发者 https://www.devze.com 2023-03-09 06:02 出处:网络
I want to build a hierarchy of sorts with a sortable list -- nothing fancy, just nudge each element of to the right a bit, so it clearly shows the hierarchy.

I want to build a hierarchy of sorts with a sortable list -- nothing fancy, just nudge each element of to the right a bit, so it clearly shows the hierarchy.

Has anyone seen a technique for this? I thought about it for a minute and thought that if I initially draw the list, I could just bump the left margin a bit for each

  • .

    But then I realized that I wouldn't know how to handle renumbering on sort... I guess I could call a function on STOP and change the margin left 开发者_如何学运维to each element... (did I just answer my own question?)

    Regardless, does anyone know of an existing answer to this? I would think someone would have already done this.


    Two options:

    Nestable - http://dbushell.com/2012/06/17/nestable-jquery-plugin/

    nestedSortable - http://mjsarfatti.com/sandbox/nestedSortable/

    Either one should do exactly what you need.

    How can I stagger a Sortable list in JQUERY?

  • 0

    精彩评论

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