Search code examples
jqueryjquery-uijquery-ui-sortablenested-sortable

jQuery nested sortable plugin almost working


Check out this jsfiddle.

I'm using the nested sortable plugin, but for some reason you are unable to drag a child <li> out of its parent. The thing is, the problem only occurs if the element is initially in the second tier. If you start off with all <li> elements on the first tier, you can drag them in and out of parent elements with no problem.

Am I missing something?


Solution

  • Just add 'items' to the options:

    $(function(){
        $('#menu-item-sort-list').nestedSortable({
            listType: 'ul',
            items: 'li'
        });
    });​
    

    Docs here.