我似乎无法让可折叠部分与nestedSortable一起使用。
http://jsfiddle.net/meisam/vq9dD/
这是我正在使用的javascript:
$('ol.sortable').nestedSortable({
disableNesting: 'no-nest',
forcePlaceholderSize: true,
handle: 'div',
helper: 'clone',
items: 'li',
opacity: .6,
placeholder: 'placeholder',
revert: 250,
tabSize: 25,
tolerance: 'pointer',
toleranceElement: '> div',
isTree: true,
startCollapsed: true,
update: function () {
order = $('ol.sortable').nestedSortable('serialize');
console.log(order);
}
});
$('.disclose').on('click', function() {
$(this).closest('li').toggleClass('mjs-nestedSortable-collapsed').toggleClass('mjs-nestedSortable-expanded');
})