Reputation: 2244
So, I need to drag and drop between two nested lists. A sort of 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 these at the same time, somehow?
Upvotes: 6
Views: 4173
Reputation: 6742
You can just use jQuery UI's connectWith
option on the nestedSortable
plugin, since the latter is just an extension of the default jQuery UI sortable.
Demo: http://jsfiddle.net/jhogervorst/Ge7eK/9/
JavaScript code:
$('ol.sortable').nestedSortable({
/* … Options for nestedSortable … */
connectWith: '.sortable'
});
Upvotes: 9
Reputation: 5699
The jquery ui solution can handle nested lists: http://jsfiddle.net/wyV7f/3/
If you need anything more than that perhaps you can hack it in?
Upvotes: 1