Use corect event when configuring nav dropdown

This commit is contained in:
Jake Howard 2022-06-12 21:08:37 +01:00
parent a1aab90eb9
commit d4c7b34a15
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -1,9 +1,8 @@
document.addEventListener("DOMContentLoaded", () => { window.addEventListener("load", () => {
const navbarBurger = document.getElementById("navbar-burger"); const navbarBurger = document.getElementById("navbar-burger");
const navbar = document.getElementById("navbar"); const navbar = document.getElementById("navbar");
navbarBurger.addEventListener("click", () => { navbarBurger.addEventListener("click", () => {
console.log("click");
navbarBurger.classList.toggle("is-active"); navbarBurger.classList.toggle("is-active");
navbar.classList.toggle("is-active"); navbar.classList.toggle("is-active");
}); });