JQuery plugin - sort nested lists between two lists

So, I need to drag between two nested lists. Combination of this: http://jqueryui.com/demos/sortable/#connect-lists

and this: http://mjsarfatti.com/sandbox/nestedSortable/

Is there something that already does this, or should I try to use them at the same time?

+6
source share
2 answers

You can simply use the jQuery UI connectWith in the nestedSortable plugin, since the latter is just the default jQuery UI sortable extension.

Demo: http://jsfiddle.net/jhogervorst/Ge7eK/9/

JavaScript Code:

 $('ol.sortable').nestedSortable({ /* … Options for nestedSortable … */ connectWith: '.sortable' });​ 
+9
source

Jquery ui solution can handle nested lists: http://jsfiddle.net/wyV7f/3/

If you need something more, maybe you can hack it?

+1
source

Source: https://habr.com/ru/post/913734/


All Articles