mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Improved navigation
This commit is contained in:
parent
229b02534e
commit
a0ef614252
@ -115,6 +115,18 @@ function RefreshTabsVisibility(){
|
||||
|
||||
});
|
||||
|
||||
document.querySelectorAll(".sidenav .bold").forEach(el => {
|
||||
|
||||
let isActive = el.querySelector("a").href.includes("#" + hash);
|
||||
|
||||
if(isActive && !el.className.includes(" active"))
|
||||
el.className += " active";
|
||||
|
||||
if(!isActive && el.className.includes(" active"))
|
||||
el.className = el.className.replace(" active", "");
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user