Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Interactive Rating Component

Abouelhouda Iliass•480
@ilyesab
A solution to the Interactive rating component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I'm proud of using JavaScript and event delegation to add a class to the rating chosen by the user. which add the visual indicator to the appropriate rating using CSS styling.

I tried to limit Media Queries in my stylesheet and tried to structure the code in a readable and understandable manner.

What challenges did you encounter, and how did you overcome them?

The main challenge was how to handle the markup of the hidden "Thank you state" that should show when the user submits a rating.

Rather than hiding elements using CSS. I used a template element to contain the markup of the hidden "Thank you state". which is styled alongside the default markup.

When the user submits the rating we delete the children of the body. and insert the contents of the template.

What specific areas of your project would you like help with?

I would like to know if the structure of my code is readable and understandable for other developers. if you find it confusing please let me know.

Thank you for viewing my solution!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Abouelhouda Iliass's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License