diff --git a/public/scripts/navbar.js b/public/scripts/navbar.js new file mode 100644 index 0000000..7ecc70e --- /dev/null +++ b/public/scripts/navbar.js @@ -0,0 +1,9 @@ +const MENUBUTTON = document.querySelector (".nav-toggler") +const NAVIGATION = document.querySelector ("nav") + +MENUBUTTON.addEventListener("click", toggleNav) + +function toggleNav(){ + MENUBUTTON.classList.toggle("active") + NAVIGATION.classList.toggle("active") +} \ No newline at end of file