1/** 2 * Pricing 3 */ 4 5'use strict'; 6 7document.addEventListener('DOMContentLoaded', function (event) { 8 (function () { 9 const priceDurationToggler = document.querySelector('.price-duration-toggler'), 10 priceMonthlyList = [].slice.call(document.querySelectorAll('.price-monthly')), 11 priceYearlyList = [].slice.call(document.querySelectorAll('.price-yearly')); 12 13 function togglePrice() { 14 if (priceDurationToggler.checked) { 15 // If checked 16 priceYearlyList.map(function (yearEl) { 17 yearEl.classList.remove('d-none'); 18 }); 19 priceMonthlyList.map(function (monthEl) { 20 monthEl.classList.add('d-none'); 21 }); 22 } else { 23 // If not checked 24 priceYearlyList.map(function (yearEl) { 25 yearEl.classList.add('d-none'); 26 }); 27 priceMonthlyList.map(function (monthEl) { 28 monthEl.classList.remove('d-none'); 29 }); 30 } 31 } 32 // togglePrice Event Listener 33 togglePrice(); 34 35 priceDurationToggler.onchange = function () { 36 togglePrice(); 37 }; 38 })(); 39}); 40 41function packagePayment(val, target) { 42 const montly = document.getElementById(target + "-year").classList.contains("d-none") === true ? "M" : "Y"; 43 window.location.href = "/payment/" + val + "-" + montly; 44}
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.