【发布时间】:2018-01-16 05:15:08
【问题描述】:
如果其中一个父母被清空(孩子转移到另一个父母),那么您将无法将孩子移回空父母。
https://jsfiddle.net/k8x7om75/
// Sort the parents
$(".sortMenu").sortable({
containment: "document",
items: "> div",
tolerance: "pointer",
cursor: "move",
opacity: 0.7,
revert: 300,
delay: 150,
placeholder: "menuPlaceholder",
start: function(e, ui) {
ui.placeholder.height(ui.helper.outerHeight());
}
});
// Sort the children
$(".menuItems").sortable({
items: "> div",
tolerance: "pointer",
containment: "document",
connectWith: '.menuItems'
});
通常我会自己做,但我不知道 JavaScript 或它的任何风格。抱歉,如果这看起来微不足道,但我需要帮助。谢谢
【问题讨论】:
-
...有什么问题?
标签: javascript jquery jquery-ui jquery-ui-sortable