【发布时间】:2017-02-14 15:15:59
【问题描述】:
这是小提琴:https://jsfiddle.net/107bx70o/3/
var ns = $('ol.sortable').nestedSortable({
forcePlaceholderSize: true,
handle: 'div',
helper: 'clone',
items: 'li',
opacity: .6,
placeholder: 'placeholder',
revert: 250,
tabSize: 25,
tolerance: 'pointer',
toleranceElement: '> div',
maxLevels: 3,
isTree: true,
expandOnHover: 700,
startCollapsed: false,
change: function() {
console.log('change');
},
sort: function() {
console.log('sort');
},
relocate: function() {
console.log('relocate');
}
});
$('#toArray').click(function(e) {
arraied = $('ol.sortable').nestedSortable('toArray', {startDepthCount: 0});
})
单击按钮时,您会收到错误消息。
我也尝试过 github 上的最新版本:https://github.com/ilikenwf/nestedSortable
但是错误是一样的。我的代码和 Fiddle 完全一样。
【问题讨论】:
标签: javascript jquery jquery-ui jquery-ui-sortable