Dashboard
PHP:
8.4.22
OS:
Linux
User:
provencez
/
/
home
/
provencez
/
www
/
wp-content
/
plugins
/
flexa-block
/
build
/
blocks
/
pricing-table
📤 Upload
📝 New File
📁 New Folder
Close
Editing: view.js
(()=>{"use strict";function t(t,e){const i=t.querySelector(".flexa-pricing-table__billing-indicator");if(!i)return;const l=e.find(t=>t.classList.contains("is-active"));l&&0!==l.offsetWidth?(i.style.setProperty("--flexa-billing-ind-x",l.offsetLeft+"px"),i.style.setProperty("--flexa-billing-ind-y",l.offsetTop+"px"),i.style.setProperty("--flexa-billing-ind-w",l.offsetWidth+"px"),i.style.setProperty("--flexa-billing-ind-h",l.offsetHeight+"px"),t.classList.add("is-indicator-ready")):t.classList.remove("is-indicator-ready")}const e=[];function i(i){const l=i.querySelector(".flexa-pricing-table__billing");if(!l)return;const n=Array.from(l.querySelectorAll(".flexa-pricing-table__billing-option"));0!==n.length&&(n.forEach(e=>{e.addEventListener("click",()=>(e=>{const o="yearly"===e;i.classList.toggle("is-yearly",o),l.setAttribute("data-billing",o?"yearly":"monthly"),n.forEach(t=>{const i=(t.getAttribute("data-billing-value")||"monthly")===e;t.classList.toggle("is-active",i),t.setAttribute("aria-pressed",i?"true":"false")}),t(l,n)})(e.getAttribute("data-billing-value")||"monthly"))}),e.push({billing:l,options:n}),window.requestAnimationFrame(()=>t(l,n)))}let l=!1;function n(){l||(l=!0,window.requestAnimationFrame(()=>{l=!1,e.forEach(e=>t(e.billing,e.options))}))}function o(){document.querySelectorAll(".flexa-pricing-table--has-toggle").forEach(i),e.length>0&&window.addEventListener("resize",n)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()})();
Save
Cancel