forked from nebulosus/web
17 lines
457 B
JavaScript
17 lines
457 B
JavaScript
|
|
||
|
function toggleMenu() {
|
||
|
const navLinks = document.querySelector(".top-bar nav ul");
|
||
|
navLinks.classList.toggle("show");
|
||
|
}
|
||
|
|
||
|
function hideMenu() {
|
||
|
const navLinks = document.querySelector(".top-bar nav ul");
|
||
|
navLinks.classList.remove("show");
|
||
|
}
|
||
|
|
||
|
window.addEventListener("resize", function() {
|
||
|
const navLinks = document.querySelector(".top-bar nav ul");
|
||
|
if (window.innerWidth > 768) {
|
||
|
navLinks.classList.remove("show");
|
||
|
}
|
||
|
});
|