Edit ─ Change path of script.js | Edit ─ Change name of script.js to navbar.js

This commit is contained in:
nocode committed 2026-05-05 11:01:33 +02:00
1 parent 7328309b42
commit 45533e5a30
1 file changed
+9
+9
View File
@@ -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")
}