PageSourceSearch

https://www.ocasa.org/hubfs/hub_generated/module_assets/1/21479977…/module_tabs-faq-section.min.js

js ocasa.org collected 2026-10-02 10:05:21 UTC 3,355 bytes, 2 lines download raw bytes

1var module_214799778409=(function(){"use strict";function init(){var tabs,panels;tabs=document.querySelectorAll(".faqtabs-nav__tab"),panels=document.querySelectorAll(".faqtabs-panel"),tabs.length&&tabs.forEach(function(tab,i){tab.addEventListener("click",function(){var targetIndex=tab.getAttribute("data-tab");tabs.forEach(function(t){t.classList.remove("is-active"),t.setAttribute("aria-selected","false")}),panels.forEach(function(p){p.classList.remove("is-active"),p.setAttribute("hidden","")}),tab.classList.add("is-active"),tab.setAttribute("aria-selected","true");var panel=document.getElementById("faqtabs-panel-"+targetIndex);panel&&(panel.classList.add("is-active"),panel.removeAttribute("hidden"))}),tab.addEventListener("keydown",function(e){var next;"ArrowRight"===e.key?((next=tabs[i+1]||tabs[0]).focus(),next.click()):"ArrowLeft"===e.key&&((next=tabs[i-1]||tabs[tabs.length-1]).focus(),next.click())})}),document.querySelectorAll(".faqtabs-item__q").forEach(function(btn){btn.addEventListener("click",function(){var expanded="true"===btn.getAttribute("aria-expanded"),answer=document.getElementById(btn.getAttribute("aria-controls"));(btn.closest(".faqtabs-accordion")?btn.closest(".faqtabs-accordion").querySelectorAll(".faqtabs-item__q"):[]).forEach(function(s){s.setAttribute("aria-expanded","false");var a=document.getElementById(s.getAttribute("aria-controls"));a&&a.classList.remove("is-open")}),expanded||(btn.setAttribute("aria-expanded","true"),answer&&answer.classList.add("is-open"))})})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",init):init()}(),void function(){var btn=document.querySelector(".faqtabs-viewmore-btn"),btnWrap=document.querySelector(".faqtabs-viewmore-wrap");function getActivePanel(){return document.querySelector(".faqtabs-panel.is-active")}function checkAndSetup(){var panel=getActivePanel();panel&&(panel.style.maxHeight="none",panel.style.height="auto",panel.style.overflow="visible",panel.scrollHeight<=600?(btnWrap.style.display="none",btn.setAttribute("aria-expanded","true")):(btnWrap.style.display="flex",panel.style.maxHeight="600px",panel.style.height="auto",panel.style.overflow="hidden",btn.setAttribute("aria-expanded","false")))}btn&&btnWrap&&(checkAndSetup(),btn.addEventListener("click",function(){if("true"===btn.getAttribute("aria-expanded")){(panel=getActivePanel())&&(panel.querySelectorAll('.faqtabs-item__q[aria-expanded="true"]').forEach(function(q){q.setAttribute("aria-expanded","false");var a=document.getElementById(q.getAttribute("aria-controls"));a&&a.classList.remove("is-open")}),panel.style.maxHeight="600px",panel.style.height="auto",panel.style.overflow="hidden",btn.setAttribute("aria-expanded","false"));var section=document.querySelector(".faqtabs-section");section&&section.scrollIntoView({behavior:"smooth",block:"start"})}else!function(){var panel=getActivePanel();panel&&(panel.style.maxHeight="none",panel.style.height="auto",panel.style.overflow="visible",btn.setAttribute("aria-expanded","true"))}();var panel}),document.querySelectorAll(".faqtabs-nav__tab").forEach(function(tab){tab.addEventListener("click",function(){setTimeout(function(){checkAndSetup()},50)})}))}());
2//# sourceURL=https://8590857.fs1.hubspotusercontent-na1.net/hubfs/8590857/hub_generated/module_assets/1/214799778409/1783581038790/module_tabs-faq-section.js

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.