We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe422d8 + a77cf3c commit 9d6cb90Copy full SHA for 9d6cb90
layouts/partials/navbar.html
@@ -164,6 +164,16 @@
164
dropdown.addEventListener("click", function (event) {
165
event.stopPropagation();
166
167
+ // hide any other active dropdowns
168
+ const allActiveDropdowns = document.querySelectorAll(".nav-link.current");
169
+ allActiveDropdowns.forEach((otherDropdown) => {
170
+ if (otherDropdown !== dropdown) {
171
+ otherDropdown.classList.remove("current");
172
+ otherDropdown.nextElementSibling.classList.remove("show");
173
+ otherDropdown.nextElementSibling.style.visibility = "hidden";
174
+ }
175
+ });
176
+
177
if (dropdown.classList.contains("current")) {
178
dropdown.classList.remove("current");
179
dropdownMenu.classList.remove("show");
0 commit comments