17.09.2018, 09:47
Try this Custom JavaScript. All sub-menus will be in collapsed state by default, apart from the menu with currently selected plan. This menu cannot be collapsed.
Code:
$(function() {
var items = $('.nav li');
$('.level').on('vclick', function() {
var li = $(this), sub = [];
while (true) {
li = li.next();
if (!li.length || li.hasClass('level')) {
break;
}
if (li.hasClass('active')) {
return;
}
sub.push(li);
}
$.each(sub, function(_, li) {
li.toggleClass('hide');
});
}).trigger('vclick');
});