Thanks for the awesome theme. I am trying to open treeview menu link using jquery where the page height is not setting properly.
var url = location.pathname;
$('a[href*="'+url+'"]').parents('.treeview').addClass('active');
Here are my two solutions for this, it's similar to your's:
var url = location.pathname;
if($('a[href*="'+url+'"]').length > 0) {
$('a[href*="'+url+'"]').parents('li').addClass('active').parents('.treeview').addClass('active');
}
var lastSegment = url.split('/').pop();
if($('a[href*="'+lastSegment+'"]').length > 0) {
$('a[href*="'+lastSegment+'"]').parents('li').addClass('active').parents('.treeview').addClass('active');
}
Still the issue persists, if the sidebar height has scroll, it doesn't adjusts after it opens.
Most helpful comment
Here are my two solutions for this, it's similar to your's: