mirror of
https://github.com/grey-cat-1908/website.git
synced 2024-11-14 20:17:27 +03:00
15 lines
352 B
JavaScript
15 lines
352 B
JavaScript
|
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;
|
||
|
}
|
||
|
}
|