gabigomes3010 / gabigomes

0 stars 0 forks source link

Gabigomes #3

Closed gabigomes3010 closed 2 months ago

gabigomes3010 commented 2 months 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'); })})