Adrianoā¢ 33,960
@AdrianoEscarabote
Posted
Hello 100rab, how are you? I truly loved your project's outcome, however I have some advice that I hope you'll find useful:
To make the submit button work only when the user selects a number, we can make some changes:
ratingButtons.forEach((rate) => {
rate.onclick = () => {
rating.innerText = rate.value
submitButton.addEventListener('click', () => {
thankYouDiv.classList.remove('hide')
ratingState.classList.add('hide')
})
}
})
The remainder is excellent.
I hope it's useful. š
Marked as helpful
0