feat: #9967, allow dropdowns in navigation

This commit is contained in:
Barış Soner Uşaklı
2021-11-03 16:01:32 -04:00
parent 98b98a1130
commit 2e623dd271
4 changed files with 25 additions and 4 deletions

View File

@@ -284,9 +284,12 @@ app.cacheBuster = null;
$('#main-nav li')
.removeClass('active')
.find('a')
.filter(function (i, x) {
return window.location.hostname === x.hostname && (window.location.pathname === x.pathname ||
window.location.pathname.startsWith(x.pathname + '/'));
.filter(function (i, a) {
return $(a).attr('href') !== '#' && window.location.hostname === a.hostname &&
(
window.location.pathname === a.pathname ||
window.location.pathname.startsWith(a.pathname + '/')
);
})
.parent()
.addClass('active');