This commit is contained in:
2026-02-13 14:19:15 +01:00
commit c0beb640e6
1591 changed files with 308373 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
/**
* Pricing
*/
'use strict';
document.addEventListener('DOMContentLoaded', function (event) {
(function () {
const priceDurationToggler = document.querySelector('.price-duration-toggler'),
priceMonthlyList = [].slice.call(document.querySelectorAll('.price-monthly')),
priceYearlyList = [].slice.call(document.querySelectorAll('.price-yearly'));
function togglePrice() {
if (priceDurationToggler.checked) {
// If checked
priceYearlyList.map(function (yearEl) {
yearEl.classList.remove('d-none');
});
priceMonthlyList.map(function (monthEl) {
monthEl.classList.add('d-none');
});
} else {
// If not checked
priceYearlyList.map(function (yearEl) {
yearEl.classList.add('d-none');
});
priceMonthlyList.map(function (monthEl) {
monthEl.classList.remove('d-none');
});
}
}
// togglePrice Event Listener
togglePrice();
priceDurationToggler.onchange = function () {
togglePrice();
};
})();
});