Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive Rating Component

@jithinsabumec

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


The code is a mess. I actually did the objectives of the task, but a problem I am encountering is that I can't confine the user to select just one rating.

Right now, the user can select all the ratings and the one which is selected last is taken into consideration.

This project helped me understand basic JS DOM Manipulation.

Feel free to go through the code and shoot your suggestions anfd feedbacks.

Happy Coding!

Community feedback

@jonathon-eng

Posted

Hi. I think I understand what your problem is. It looks like you used <button> for your solution. And I can understand that is a reasonable idea, however, the solution seems to use radio buttons which are a form of input that only restricts the user to one answer. I’m sure it’s possible to use your solution with a lot of JavaScript, but I think the way to go would be with radio buttons and styling them to look like you do now.

To get you started: https://moderncss.dev/pure-css-custom-styled-radio-buttons/

And also search for how to put a label inside of a radio button

Marked as helpful

2

@jithinsabumec

Posted

Hi, The solution worked. I had to search a bit to learn how to place a label inside a radio button. Hope the challenge is completed successfully. Thank you for your feedback and do give your suggestions on future challenges too.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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