bunch of stuff, idk, just throwing things at the wall

This commit is contained in:
inherentlee committed 2026-09-27 13:53:17 -07:00
1 parent dd0019a666
commit a605a05943
9 files changed
+96 -142

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
const dropdowns = document.querySelectorAll(".dropdown");
const openDropdown = function(input, ul) {
input.ariaExpanded = "true";
input.setAttribute("checked", "");
ul.ariaHidden = "false";
}
const closeDropdown = function(input, ul) {
input.ariaExpanded = "false";
input.removeAttribute("checked");
ul.ariaHidden = "true";
}
for (const dropdown of dropdowns) {
const input = dropdown.querySelector("input");
const ul = dropdown.querySelector("ul");
const lis = ul.querySelectorAll("li");
const firstItem = lis[0];
const lastItem = lis[lis.length - 1];
/* start state */
input.ariaExpanded = "false";
ul.ariaHidden = "true";
}