new pricing

This commit is contained in:
Matt Batchelder
2026-05-12 13:56:51 -04:00
parent a0049be6fb
commit b013b33839
5 changed files with 100 additions and 8 deletions

View File

@@ -744,6 +744,27 @@ document.addEventListener('DOMContentLoaded', () => {
stages.forEach(function (stage) { io.observe(stage); });
}
/* ── Pricing billing toggle ─────────────────────────────── */
document.querySelectorAll('.pricing-billing-toggle').forEach(function(toggle) {
toggle.addEventListener('click', function(e) {
var btn = e.target.closest('.pbt-option');
if (!btn) return;
var billing = btn.dataset.billing;
toggle.querySelectorAll('.pbt-option').forEach(function(b) {
b.classList.toggle('active', b === btn);
b.setAttribute('aria-pressed', b === btn ? 'true' : 'false');
});
var section = toggle.closest('section');
if (!section) return;
section.querySelectorAll('.pbt-show-monthly').forEach(function(el) {
el.hidden = (billing === 'annual');
});
section.querySelectorAll('.pbt-show-annual').forEach(function(el) {
el.hidden = (billing === 'monthly');
});
});
});
function startTsSlides(stage) {
var slides = stage.querySelectorAll('.ts-slide');
if (!slides.length) return;