Nest jQuery UI sortables

前端 未结 4 1424
旧时难觅i
旧时难觅i 2020-12-17 23:30

Is there a way to have nested jQuery sortables? As in nested containers, not in the sense of a nested list.

4条回答
  •  无人及你
    2020-12-18 00:17

    plugin fixes :

    var sortable = $.widget("ui.sortable", $.ui.mouse, {
        _contactContainers: function(event) {   
                // never consider a container that's located within the item itself
                if($.contains(this.currentItem[0], this.containers[i].element[0]) || this.currentItem[0] === this.containers[i].element[0]) {
                    continue;
                }
        }   
    }
    

提交回复
热议问题