Jquery UI sortable - sort items only on drop event

谁说我不能喝 提交于 2021-01-27 20:36:48

问题


I want to disable sorting of items when item is dragged. Only after the drop has been completed the items must sort accordingly.

Thanks, Vimalraj Theerkatharisi

$(function() {
    $( "#sortable" ).sortable({
        tolerance: 'pointer',
        revert: 'invalid',
        forceHelperSize: true,
        scroll: true,
        forcePlaceholderSize: true,
        placeholder: 'ui-state-highlight',
        helper: 'clone',
        containment: 'parent',
        cursor: 'move',        
        distance: 5,
        opacity: 0.3,
    });
});

jsfiddle

来源:https://stackoverflow.com/questions/30324564/jquery-ui-sortable-sort-items-only-on-drop-event

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