-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
19 lines (17 loc) · 670 Bytes
/
Copy pathapp.js
File metadata and controls
19 lines (17 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const lista = document.querySelector(".navigation__list");
const burguer = document.querySelector(".navigation__button");
const nav = document.querySelector(".navigation__nav");
const navigation = document.querySelector(".navigation__background");
const links = lista.querySelectorAll("a");
burguer.addEventListener("click", () => {
nav.classList.toggle("nav-open");
navigation.classList.toggle("background-open");
burguer.classList.toggle("toggle");
});
links.forEach((link) => {
link.addEventListener("click", () => {
nav.classList.toggle("nav-open");
navigation.classList.toggle("background-open");
burguer.classList.toggle("toggle");
});
});