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 Exercise using HTML, CSS and JS

@godsonCodes

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


Hello Mentors.

Here's my take on the interactive rating component exercise. I look forward to receive your comments and observations.

Thanks in anticipation.

Community feedback

Adriano 34,090

@AdrianoEscarabote

Posted

Hi Olayinka Oluwafemi, 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:

numberBtn.forEach(btn =>{
    btn.addEventListener('click', () =>{
        console.log(btn.innerText);
        selected.innerText = btn.innerText
        submitBtn.onclick = () =>{
            thanks.classList.toggle('active');
            box.classList.toggle('active');
        }
    })
})

The rest is great!

I hope it helps... 👍

0

@godsonCodes

Posted

Thanks for reviewing my code Adriano. I will try out your suggestion.

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