Common.js: Difference between revisions
From Engineering Client Portal
No edit summary |
LaMarHolmes (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
/* Make the hamburger icon collapse the side menu -La Mar */ | |||
document.getElementsByClassName("toctogglespan")[0].addEventListener("click", collapseSideList); | |||
function collapseSideList(){ | |||
var hamburger = document.getElementById("toc").childNodes[3]; | |||
if(hamburger.style.display == ''){ | |||
hamburger.style.display = "none"; | |||
} else{ | |||
hamburger.style.display = ""; | |||
} | |||
} |
Revision as of 03:00, 25 June 2024
/* Any JavaScript here will be loaded for all users on every page load. */
/* Make the hamburger icon collapse the side menu -La Mar */
document.getElementsByClassName("toctogglespan")[0].addEventListener("click", collapseSideList);
function collapseSideList(){
var hamburger = document.getElementById("toc").childNodes[3];
if(hamburger.style.display == ''){
hamburger.style.display = "none";
} else{
hamburger.style.display = "";
}
}