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

@ChelseaChanu

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


Any suggestion on how to improve js code.

Community feedback

Shalom2935 420

@Shalom2935

Posted

remove the charset in your script element

Marked as helpful

0
P
visualdennis 8,375

@visualdenniss

Posted

Hello,

As for best practice, I'd suggest adding a cursor: pointer; to the buttons to indicate interactivity to the user and therefore improving the user experience as well.

Regarding JS, i think instead of creating all of those create new elements on the page and innerHTML etc. you can simply have your html written for the thank you page, but simply change it from display none to display block or similar with an event handler, while making the rating section display none. You can use also data attributes to store data etc.

Hope you find this feedback helpful!

Marked as helpful

0

@ChelseaChanu

Posted

@visualdenniss Thanks a lot for the advice. The code looks much cleaner😊.

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