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 | jQuery

OsolalDev 70

@OdaSolaDev

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


Hey there! ^-^ I'm starting to do my own stuff since I started learning Web Development, and I would appreciate some feedback, especially about how I write my code (if it can be optimized or other ways of doing the same thing).

Community feedback

SutonToch 340

@SutonToch

Posted

Looks great! Congrats on completing the challenge.

I really like your comments and the way you space things out. Makes everything very readable.

Your code looks absolutely fine to me and everything works like I would expect it. Some notes:

  • You declared CSS-variables but never used them. If you want to use your --lightGrey for example, replace #959eac outside :root with var(--lightGrey).
  • Your JS-variables should be const instead of let unless you reassign them. That way, it's more clear what is going to be reassigned at first glance.
  • You have a TypeError if someone tries to submit before choosing a rating. You can probably fix that with a simple conditional in your submitRating.click(...).

If you have any further questions, feel free to throw them my way :).

Be proud of yourself and keep on going!

Marked as helpful

0

OsolalDev 70

@OdaSolaDev

Posted

Thank you for your notes! @SutonToch

I made my code a little bit more clear with your tips, and I didn't even notice the TypeError. I fixed it and added a nice error message ^^. I will pay more attention to those from now on.

0
Aravindhan 320

@aravindhan7

Posted

Hey, your solution was soo good, small corrections i want to tell.

when the button is clicked, it should remain orange, but your solution shows grey when numbers are clicked.

Morover if you hover numbers and submit button, the transition is soo fast. you can add timing to transition like

transition: 0.3s (to look the hovers smooth)

hope it is useful

Marked as helpful

0

OsolalDev 70

@OdaSolaDev

Posted

Hi, @aravindhan7 !

Thank you for your corrections. I made some changes with your tips, and now my solution looks better!

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