1(function setupPricingToggle() { 2 var toggleButtons = document.querySelectorAll('.pricing-toggle-btn') 3 if (!toggleButtons.length) return 4 5 function setBillingMode(mode) { 6 toggleButtons.forEach(function (btn) { 7 btn.classList.toggle('active', btn.getAttribute('data-billing') === mode) 8 }) 9 10 document.querySelectorAll('.billing-original, .billing-promo, .billing-meta').forEach(function (el) { 11 var nextValue = el.getAttribute('data-' + mode) 12 if (nextValue) { 13 el.textContent = nextValue 14 } 15 }) 16 17 document.querySelectorAll('.billing-plan-savings').forEach(function (el) { 18 var nextValue = el.getAttribute('data-' + mode) || '' 19 el.textContent = nextValue 20 el.classList.toggle('is-active', Boolean(nextValue)) 21 }) 22 } 23 24 toggleButtons.forEach(function (btn) { 25 btn.addEventListener('click', function () { 26 setBillingMode(btn.getAttribute('data-billing') || 'monthly') 27 }) 28 }) 29})()
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.