1/******/ (() => { // webpackBootstrap 2var __webpack_exports__ = {}; 3/*!************************************!*\ 4 !*** ./js/modern-pricing-table.js ***! 5 \************************************/ 6/** 7 * Handle switches & frequency change 8 */ 9const tableWrap = document.querySelector('.table-wrap'); 10const table = document.querySelector('.modern-table'); 11const planSwitches = document.querySelectorAll('.modern-table-switch-input'); 12const planLabels = document.querySelectorAll('.modern-table-switch-label'); 13const prices = document.querySelectorAll('.modern-table-price-inner'); 14const planFrequencies = document.querySelectorAll('.plan-frequency'); 15const checked = table.dataset.defaultFrequency !== 'monthly'; 16const handlePlanChange = plan => { 17 prices.forEach(el => el.innerHTML = '$' + el.getAttribute(`data-price-${plan}`)); 18 planLabels.forEach(el => el.classList.contains(plan) ? el.classList.add('is-bold-text') : el.classList.remove('is-bold-text')); 19}; 20const handleCheckboxChange = isChecked => { 21 planSwitches.forEach(el => el.checked = isChecked); 22 handlePlanChange(isChecked ? 'annually' : 'monthly'); 23}; 24handlePlanChange(checked ? 'annually' : 'monthly'); 25planSwitches.forEach(element => { 26 element.checked = checked; 27 element.addEventListener('change', e => handleCheckboxChange(e.target.checked)); 28}); 29 30/** 31 * Handle title style between asterisks 32 */ 33document.querySelectorAll('.modern-table-title').forEach(element => { 34 const dataTitle = element.dataset.title; 35 element.innerHTML = dataTitle.replace(/\*([^*]+)\*/g, `<span class="highlight-text">$1</span>`); 36}); 37 38/** 39 * Handle mobile tabs & items change 40 */ 41const tabs = document.querySelectorAll('.tab'); 42const handleTabChange = tab => { 43 document.querySelectorAll('.is-active').forEach(item => item.classList.remove('is-active')); 44 document.querySelectorAll(`.tab-${tab}`).forEach(item => item.classList.add('is-active')); 45}; 46handleTabChange(tableWrap.dataset.defaultPlan); 47tabs.forEach((element, index) => element.addEventListener('click', () => { 48 handleTabChange(element.dataset.tab, index); 49})); 50/******/ })() 51; 52//# sourceMappingURL=modern-pricing-table.js.map
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.