-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
25 lines (22 loc) · 934 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
document.addEventListener("DOMContentLoaded", function() {
const hamburgerContainer = document.querySelector(".hamburger-container");
const overlayMenu = document.querySelector(".overlay-menu");
const closeBtn = document.querySelector(".close-btn");
hamburgerContainer.addEventListener("click", function() {
overlayMenu.classList.add("active");
});
closeBtn.addEventListener("click", function() {
overlayMenu.classList.remove("active");
});
const overlayMenuItems = overlayMenu.querySelectorAll(".overlay-buttons button");
overlayMenuItems.forEach((item, index) => {
if (index !== overlayMenuItems.length - 1) {
item.addEventListener("mouseover", function() {
item.style.color = "#FF5555";
});
item.addEventListener("mouseout", function() {
item.style.color = "";
});
}
});
});