HTMLify
script.js
Views: 51 | Author: karbonsites
1 | function nextStep(stepNumber) { const currentStep = document.querySelector('.wizard-step:not([style*="display: none"])'); const nextStepEl = document.getElementById('step-' + stepNumber); if (currentStep) currentStep.style.display = 'none'; if (nextStepEl) nextStepEl.style.display = 'block'; document.querySelectorAll('.step-indicator').forEach(ind => { const s = parseInt(ind.getAttribute('data-step')); if (s <= stepNumber) { ind.classList.add('active'); } else { ind.classList.remove('active'); } }); } |