UI可排序,然后抓取最后一项,它总是左转

时间:2017-07-19 19:41:45

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

ui sortable js有问题。

enter image description here

然后我抓住内容并用鼠标左上方左下方内容框左转。然后我抓住第一个,第二个或第三个内容框,这一切都很好,他们留下了鼠标抓取图标。哪个可能是问题?

HTML:

<div class="row row-7294174766 ui-sortable">
<div class="minmin-column col-sm-3">
    <div id="column-2787694957">
        <div class="minmin-handle-column">
            <div class="optionWrapper clearfix"><i class="removeColumn fa fa-trash-o" aria-hidden="true"></i><i class="addWidgets fa fa-plus" aria-hidden="true"></i><i class="showColumnOptions fa fa-cog" aria-hidden="true"></i><i class="dragibleColumn fa fa-arrows ui-sortable-handle" aria-hidden="true"></i></div>
        </div>
        <div class="columnBox clearfix">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque beatae quam fuga explicabo ducimus magnam aliquid necessitatibus possimus provident nihil qui nesciunt, odi.</p>
        </div>
    </div>
</div>
<div class="minmin-column col-sm-3">
    <div id="column-9177189472">
        <div class="minmin-handle-column">
            <div class="optionWrapper clearfix"><i class="removeColumn fa fa-trash-o" aria-hidden="true"></i><i class="addWidgets fa fa-plus" aria-hidden="true"></i><i class="showColumnOptions fa fa-cog" aria-hidden="true"></i><i class="dragibleColumn fa fa-arrows ui-sortable-handle" aria-hidden="true"></i></div>
        </div>
        <div class="columnBox clearfix">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque beatae quam fuga explicabo ducimus magnam aliquid necessitatibus possimus provident nihil qui nesciunt, odi.</p>
        </div>
    </div>
</div>
<div class="minmin-column col-sm-3">
    <div id="column-2343620337">
        <div class="minmin-handle-column">
            <div class="optionWrapper clearfix"><i class="removeColumn fa fa-trash-o" aria-hidden="true"></i><i class="addWidgets fa fa-plus" aria-hidden="true"></i><i class="showColumnOptions fa fa-cog" aria-hidden="true"></i><i class="dragibleColumn fa fa-arrows ui-sortable-handle" aria-hidden="true"></i></div>
        </div>
        <div class="columnBox clearfix">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque beatae quam fuga explicabo ducimus magnam aliquid necessitatibus possimus provident nihil qui nesciunt, odi.</p>
        </div>
    </div>
</div>
<div class="minmin-column col-sm-3" style="position: relative; left: 0px; top: 0px;">
    <div id="column-9763480300">
        <div class="minmin-handle-column">
            <div class="optionWrapper clearfix"><i class="removeColumn fa fa-trash-o" aria-hidden="true"></i><i class="addWidgets fa fa-plus" aria-hidden="true"></i><i class="showColumnOptions fa fa-cog" aria-hidden="true"></i><i class="dragibleColumn fa fa-arrows ui-sortable-handle" aria-hidden="true"></i></div>
        </div>
        <div class="columnBox clearfix">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque beatae quam fuga explicabo ducimus magnam aliquid necessitatibus possimus provident nihil qui nesciunt, odi.</p>
        </div>
    </div>
</div>
</div>

JS:

$( '.row' ).sortable({
   items: ".minmin-column",
   handle: '.dragibleColumn',
   cursor: 'grabbing',
   revert: 300,
   axis: 'x',
   placeholder: ''
});

现场演示:http://jsfiddle.net/anonimnos/b2hk59sp/

0 个答案:

没有答案