Skip to content

Commit 60d17c0

Browse files
authored
Merge pull request #60 from jen67/newapp
done
2 parents caabad2 + 1ef60f2 commit 60d17c0

File tree

1 file changed

+0
-72
lines changed
  • intro-section-with-dropdown-navigation-main

1 file changed

+0
-72
lines changed

intro-section-with-dropdown-navigation-main/script.js

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4,78 +4,6 @@
44
const openMenu = document.querySelector(".menu-open-icon");
55
const closeMenu = document.querySelector(".menu-close-icon");
66
const navBar = document.querySelector("nav");
7-
const dropDownContainers = document.querySelectorAll("header nav ul li a");
8-
const dropDowns = document.querySelectorAll("header nav ul li ul");
9-
const dropdownArrows = document.querySelectorAll(".changeImg");
10-
11-
12-
13-
14-
// // Handles the dropdowns
15-
// dropDownContainers.forEach((dropDownContainer, index) => {
16-
// // Function to close all dropdowns and open the selected one
17-
// const toggleDropdown = () => {
18-
// dropDowns.forEach((dropdown, i) => {
19-
// if (i !== index) {
20-
// dropdown.classList.add("drop");
21-
// dropdownArrows[i].src = "./images/icon-arrow-down.svg";
22-
// }
23-
// });
24-
25-
// dropDowns[index].classList.toggle("drop");
26-
27-
// if (dropDowns[index].classList.contains("drop")) {
28-
// dropdownArrows[index].src = "./images/icon-arrow-down.svg";
29-
// } else {
30-
// dropdownArrows[index].src = "./images/icon-arrow-up.svg";
31-
// }
32-
// };
33-
34-
// // Toggle on mouse enter
35-
// dropDownContainer.addEventListener("mouseenter", toggleDropdown);
36-
37-
// // Toggle on focus
38-
// dropDownContainer.addEventListener("focus", toggleDropdown);
39-
40-
// // Toggle on mouse leave
41-
// dropDownContainer.addEventListener("mouseleave", () => {
42-
// if (!dropDownContainer.matches(":focus")) {
43-
// toggleDropdown();
44-
// }
45-
// });
46-
47-
// // Toggle on blur
48-
// dropDownContainer.addEventListener("blur", () => {
49-
// if (!dropDownContainer.matches(":hover")) {
50-
// toggleDropdown();
51-
// }
52-
// });
53-
54-
55-
// // dropDownContainer.addEventListener("mouseenter", () => {
56-
// // // Toggle the 'drop' class on mouse enter
57-
// // dropDowns[index].classList.toggle("drop");
58-
59-
// // // Change the dropdown arrow image on mouse enter
60-
// // if (dropDowns[index].classList.contains("drop")) {
61-
// // dropdownArrows[index].src = "./images/icon-arrow-down.svg";
62-
// // } else {
63-
// // dropdownArrows[index].src = "./images/icon-arrow-up.svg";
64-
// // }
65-
// // });
66-
67-
// // dropDownContainer.addEventListener("mouseleave", () => {
68-
// // // Toggle the 'drop' class on mouse leave
69-
// // dropDowns[index].classList.toggle("drop");
70-
71-
// // // Change the dropdown arrow image back to the original on mouse leave
72-
// // if (dropDowns[index].classList.contains("drop")) {
73-
// // dropdownArrows[index].src = "./images/icon-arrow-down.svg";
74-
// // } else {
75-
// // dropdownArrows[index].src = "./images/icon-arrow-up.svg";
76-
// // }
77-
// });
78-
797

808
// Handles the handburger menus and the navbar
819
openMenu.addEventListener("click", () => {

0 commit comments

Comments
 (0)