嵌套的jQuery UI可排序

时间:2014-01-08 04:01:37

标签: javascript jquery jquery-ui nested jquery-ui-sortable

我有一些嵌套的sortables,但是当我尝试移动它们时会遇到问题。

有时会跳转,有时会尝试将其放在父级而不是框内。

无论如何要使它保持一致并正常工作?

此外,当我将容差模式设置为pointer时,无法将其放入可排序的子项中。

http://jsfiddle.net/tFY59/4/

<div class="wrapper">
    <div class="row">
        <div class="box"></div>
    </div>
    <div class="row">
        <div class="box"></div>
    </div>
</div>

$('.wrapper, .box').sortable({
    connectWith: '.wrapper, .box',
    //tolerance: 'pointer',
    placeholder: 'placeholder ui-state-highlight ui-corner-all',
    forcePlaceholderSize: true,
    cursorAt: {
        left: -10
    },
    start: function() {
        $('.placeholder').append('<span>Move here...</span>');
    }.bind(this)
});

0 个答案:

没有答案