mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: navigation highlight
/top was getting hightlighted in navigation if you went into a /topic
This commit is contained in:
@@ -244,7 +244,10 @@ app.cacheBuster = null;
|
|||||||
$('#main-nav li')
|
$('#main-nav li')
|
||||||
.removeClass('active')
|
.removeClass('active')
|
||||||
.find('a')
|
.find('a')
|
||||||
.filter(function (i, x) { return window.location.pathname.startsWith(x.getAttribute('href')); })
|
.filter(function (i, x) {
|
||||||
|
return window.location.pathname === x.pathname ||
|
||||||
|
window.location.pathname.startsWith(x.pathname + '/');
|
||||||
|
})
|
||||||
.parent()
|
.parent()
|
||||||
.addClass('active');
|
.addClass('active');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user