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 using HTML, CSS flexbox & Vanilla JS.

@gauravsingh1281

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


Have a look over my code and give a suggestions on how i can improve my coding skills.

Community feedback

mrxshinji 370

@mrxshinji

Posted

For your alert code, it is better not to touch innerText with js whenever possible in my opinion. Its like all the changes in structure should keep in html, script changes in js, and stylechanges in css .

I would use css {display: none} and {display: block} to show the text by adding active class instead.

<p id="alert">"Please select a number"</p>
#alert{
  display: none;
}

#alert.active {
  display: block {
}
document.querySelector("#alert").classList.add("active")

This should be the way to write this....

Marked as helpful

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