I can't seem to get the collapsible part working with nestedSortable.
http://jsfiddle.net/meisam/vq9dD/
Here is the javascript I'm using:
$('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');
})
The version of the plugin you were using was not working. I upgraded the plugin and changed the collapsible code to the following:
$('.mjs-nestedSortable-collapsed').on('click', function () {
$(this).toggleClass('mjs-nestedSortable-collapsed').toggleClass('mjs-nestedSortable-expanded');
});
Fiddle here