ctdo.de/app/js/nav.js

18 lines
435 B
JavaScript
Raw Permalink Normal View History

2023-10-04 11:00:10 +00:00
var nav = document.getElementsByTagName("nav")[0];
function ToggleNav() {
showNav = nav.style.display != "" && nav.style.display != "none";
if (showNav) {
nav.style.display = "none";
} else {
nav.style.display = "block";
}
}
window.addEventListener("resize", function(){
if (window.innerWidth > 885) {
nav.style.display = "block";
} else {
nav.style.display = "none";
}
});