Closed gabigomes3010 closed 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'); })})
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'); })})