Interactive Rating

Solution retrospective
The one issue I would like to continue working on is making sure that the user can only choose one rating (only one number button click will be logged and passed into the display number.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @mario994
Hi, I start a new pull request to your project.
Marked as helpful - @Abdulmojeed58
I can relate 100%
Try and use the target event Add an event listener to the overall card, then target the button.(use e parameter)
document.querySelector(“.card”).addEventListener((“click”, (e) => { If(e.target.classList.contains(“btn”) { //your function } });
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