Pedroogu123 / Index.html

0 stars 0 forks source link

Script #2

Open Pedroogu123 opened 1 month ago

Pedroogu123 commented 1 month ago

const avanca = document.querySelectorAll('.btn-proximo');

avanca.forEach(button => { button.addEventListener('click', function(){ const atual = document.querySelector('.ativo'); const proximoPasso = 'passo-' + this.getAttribute('data-proximo');

    atual.classList.remove('ativo');
    document.getElementById(proximoPasso).classList.add('ativo');
})

})

Pedroogu123 commented 1 month ago

Documento 2