Interactive rating component

Solution retrospective
making some js projects to increase js knowledge love to hear feedbacks to increase my knowledge ♥
Please log in to post a comment
Log in with GitHubCommunity feedback
- @AdrianoEscarabote
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
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord