Jake Vanderwerf
2026-01-01 2bb9aaaf24b794b528e3894ee9f9c42ca6d7fe93
1
document.addEventListener("DOMContentLoaded",(()=>{if(document.querySelectorAll(".faq-block").forEach((e=>{e.querySelectorAll(".faq-item").forEach((e=>{const t=e.querySelector(".faq-item__question"),i=e.querySelector(".faq-item__answer");t&&i&&(t.addEventListener("click",(()=>{const o="true"===t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",!o),o?(i.style.height=i.scrollHeight+"px",i.offsetHeight,i.style.height="0",setTimeout((()=>{i.style.display="none",i.style.height=""}),300),e.classList.remove("faq-item--expanded")):(i.style.display="block",i.style.height="0",i.offsetHeight,i.style.height=i.scrollHeight+"px",setTimeout((()=>{i.style.height="auto"}),300),e.classList.add("faq-item--expanded"))})),t.addEventListener("keydown",(e=>{" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),t.click())})))}))})),window.location.hash){const e=window.location.hash.substring(1),t=document.querySelector(`[data-faq-id="${e}"]`);if(t){const e=t.querySelector(".faq-item__question");"true"===e.getAttribute("aria-expanded")||e.click(),setTimeout((()=>{t.scrollIntoView({behavior:"smooth",block:"center"})}),350)}}}));