Dashboard
PHP:
8.4.22
OS:
Linux
User:
provencez
/
/
home
/
provencez
/
www
/
wp-content
/
plugins
/
flexa-block
/
build
/
blocks
/
faq
📤 Upload
📝 New File
📁 New Folder
Close
Editing: view.js
(()=>{"use strict";function e(e){const t=e.hasAttribute("data-close-others"),a=e.hasAttribute("data-allow-toggle"),r=Array.from(e.querySelectorAll(".flexa-faq__item"));if(!r.length)return;const o=(e,t)=>{e.toggleAttribute("data-open",t);const a=e.querySelector(".flexa-faq__question");a&&a.setAttribute("aria-expanded",t?"true":"false")};r.forEach(e=>{const n=e.querySelector(".flexa-faq__question");n&&n.addEventListener("click",()=>{e.hasAttribute("data-open")?a&&o(e,!1):(t&&r.forEach(t=>{t!==e&&o(t,!1)}),o(e,!0))})})}function t(e){e.classList.add("flexa-bg-loaded"),e.removeAttribute("data-flexa-lazy-bg")}function a(){document.querySelectorAll("[data-flexa-faq]").forEach(e);const a=document.querySelectorAll("[data-flexa-lazy-bg]");if(!a.length)return;if(void 0===window.IntersectionObserver)return void a.forEach(t);const r=new window.IntersectionObserver((e,a)=>{e.forEach(e=>{e.isIntersecting&&(t(e.target),a.unobserve(e.target))})},{rootMargin:"200px 0px"});a.forEach(e=>r.observe(e))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a()})();
Save
Cancel