Connected Nested Lists in Jquery UI Sortable

柔情痞子 提交于 2019-12-12 01:08:23

问题


Ey dudes, please take a look at this fiddle: http://jsfiddle.net/HG8k6/.

$(document).ready(function () {
    $("ul.containers").sortable({
        axis: 'y',
        placeholder: "ui-state-highlight",
        forcePlaceholderSize: true
    });

    $("ul.containers").disableSelection();

    $("ul.rows").sortable({
        axis: 'y',
        placeholder: "ui-state-highlight",
        forcePlaceholderSize: true
    });

    $("ul.rows").disableSelection();
});

It's working ok in some way, I have containers and rows, I can move them perfect, but what I really want to achieve is to move rows between containers, for example move the Row5 from Container2 to Container1. Thanks in advance and greetings from Colombia, South America!!


回答1:


Use connectWith:'.rows' updated fiddle



来源:https://stackoverflow.com/questions/20709838/connected-nested-lists-in-jquery-ui-sortable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!