且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用jquery sortable时如何重复项目?

更新时间:2022-06-21 09:38:55

一开始,有看看这个,并阅读@Erez答案。

For a beginning, have a look at this, and read @Erez answer, too.

    $(function() {
        $( "#sortable1" ).sortable({
            connectWith: ".connectedSortable",
            remove: function(event, ui) {
                ui.item.clone().appendTo('#sortable2');
                $(this).sortable('cancel');
            }
        }).disableSelection();

    $( "#sortable2" ).sortable({
            connectWith: ".connectedSortable"
        }).disableSelection();
    });