Design comparison
SolutionDesign
Solution retrospective
I had to think for a while to get the selected buttons, it took me some time xD but then I finally did it, if you have any suggestions for me I'd appreciate :)
Community feedback
- @MarcusTuliusCiceronPosted over 2 years ago
Hi congrats for completing this challenge.
I found a small issue, user can select multiple ranks. To fix this here how you could do:
document.querySelectorAll('.rate').forEach(rate => { rate.addEventListener('click', () => { document.querySelectorALL('.rate').forEach(rateElem => { rateElem.classList.remove('selected') }) rate.classList.toggle('selected') }) })
hope this will help you :)
Happy codding :D
Marked as helpful1
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