mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
feat: #9967, allow dropdowns in navigation
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user