Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Responsive interactive-rating-component page using Flexbox, Vanilla JS

Coffeemechanics•100
@Coffeemechanics
A solution to the Interactive rating component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


SOLVED

I've found an error and couldn't fix it. As you can see when you open the page the buttons are inactive, but atleast one of them should've been active if you inspect my code. So I hid a button and made it's display property none, but the problem is; even if you don't select a button and click submit directly as you open the page, you give 1 point. I wanted to write something like "pseudocode version:if the rating value equals to 0 submit button shouldn't work." so I added a class to submit button and wrote "pointer-events:none" in css, and in js I wrote something like "if (rating_value != 0){elementname.classlist.add("disablethesubmitbutton")", but it didn't work. Thanks beforehand!

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 Coffeemechanics'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