Jquery UI - 在一个 DIV 到另一个 Div 之间可排序,在 DIV 中不可排序
Jquery UI -sortable between one DIV to another Div, without sortable in within the DIV
我有 'N' 个起始行(红色边框)我想要可排序(数字框 1、2、3 等)形成起始行(红色边框)以接收行(绿色边框)。
sortable 不应在起始行(红色边框)内工作。并且在接收行(绿色边框)内可排序必须有效。
这里我只想禁用/取消起始行(红色边框)内的可排序功能。
我使用了下面的脚本代码。
$('.draggable-row').sortable({
connectWith:".sortable-row"
});
$('.sortable-row').sortable({
connectWith:".sortable-row"
});
只有可排序的行应该是.sortable
;其他应该是 .draggable
.
$('.draggable-row span').draggable({
connectToSortable:".sortable-row",
revert: 'invalid'
});
$('.sortable-row').sortable({
revert: true
});
我有 'N' 个起始行(红色边框)我想要可排序(数字框 1、2、3 等)形成起始行(红色边框)以接收行(绿色边框)。
sortable 不应在起始行(红色边框)内工作。并且在接收行(绿色边框)内可排序必须有效。
这里我只想禁用/取消起始行(红色边框)内的可排序功能。
我使用了下面的脚本代码。
$('.draggable-row').sortable({
connectWith:".sortable-row"
});
$('.sortable-row').sortable({
connectWith:".sortable-row"
});
只有可排序的行应该是.sortable
;其他应该是 .draggable
.
$('.draggable-row span').draggable({
connectToSortable:".sortable-row",
revert: 'invalid'
});
$('.sortable-row').sortable({
revert: true
});