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

@shivakumar-ui-max

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Adriano 34,090

@AdrianoEscarabote

Posted

Hi shiva kumar, how are you? I really liked the result of your project, but I have some tips that I think you will enjoy:

To make the submit button work only when the user selects a number, we can do this:

btn.forEach((e) => {
  e.addEventListener('click', () => {
    rating.innerHTML = e.innerHTML
    submit.addEventListener('click', () => {
      container1.style.display = 'none'
      container2.style.display = 'block'
    })
  })
})

The rest is great!

I hope it helps... 👍

Marked as helpful

0

@shivakumar-ui-max

Posted

@AdrianoEscarabote thanks man

1

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