Improved navigation

This commit is contained in:
Pierre HUBERT 2019-01-14 14:19:56 +01:00
parent 229b02534e
commit a0ef614252

View File

@ -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", "");
});
}
/**