问题
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