website/static/javascript/navbar.js

15 lines
352 B
JavaScript
Raw Normal View History

2023-10-21 12:46:00 +03:00
let navOpen = false
function getNavbar() {
let navbar = document.getElementById("nav-toggle")
switch (navOpen) {
case false:
navbar.classList.add("active")
navOpen = true;
break;
case true:
navbar.classList.remove("active")
navOpen = false;
break;
}
}