Design comparison
SolutionDesign
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.
Community feedback
- @mario994Posted over 2 years ago
Hi, I start a new pull request to your project.
Marked as helpful0 - @Abdulmojeed58Posted over 2 years ago
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 helpful0
Please log in to post a comment
Log in with GitHubJoin 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