Skip to content

Commit de27485

Browse files
committed
This dropdown javascript is no longer being used.
Signed-off-by: kaimmej <[email protected]>
1 parent 33aaeac commit de27485

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

assets/js/main.js

-42
Original file line numberDiff line numberDiff line change
@@ -83,45 +83,3 @@ define(function() {
8383
});
8484

8585

86-
87-
"use strict";
88-
var theme = {
89-
init: function () {
90-
theme.menu();
91-
},
92-
93-
// Menu
94-
menu: () => {
95-
const dropdownLinks = document.querySelectorAll(".dropdown-menu a.dropdown-toggle");
96-
97-
dropdownLinks.forEach(function (dropdownLink) {
98-
dropdownLink.addEventListener("click", function (e) {
99-
if (!this.nextElementSibling.classList.contains("show")) {
100-
const parentDropdownMenu = this.closest(".dropdown-menu");
101-
const currentlyOpenSubMenus = parentDropdownMenu.querySelectorAll(".show");
102-
currentlyOpenSubMenus.forEach(function (openSubMenu) {
103-
openSubMenu.classList.remove("show");
104-
});
105-
}
106-
107-
const subMenu = this.nextElementSibling;
108-
subMenu.classList.toggle("show");
109-
110-
const parentDropdown = this.closest("li.nav-item.dropdown.show");
111-
if (parentDropdown) {
112-
parentDropdown.addEventListener("hidden.bs.dropdown", function (e) {
113-
const dropdownSubMenus = document.querySelectorAll(".dropdown-submenu .show");
114-
dropdownSubMenus.forEach(function (dropdownSubMenu) {
115-
dropdownSubMenu.classList.remove("show");
116-
});
117-
});
118-
}
119-
120-
e.stopPropagation();
121-
});
122-
});
123-
},
124-
};
125-
126-
theme.init();
127-

0 commit comments

Comments
 (0)