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 and Javascript

Paul 120

@SageKyle

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


How do I add a delay period after the user clicks on submit before showing the thank you section.

Community feedback

@fazzaamiarso

Posted

Hello Paul! Nice solution!

To add delay you can use setTimeout. Please refer to this resource

setTimeout( () => {
 if (star.textContent.length === 0) {
         star.textContent = '0';
        thankYouPage.style.display = 'grid';
        welcomeSection.style.display = 'none';
    } else {
        thankYouPage.style.display = 'grid';
        welcomeSection.style.display = 'none';
    }
}, 3000) //3000 is the delay in milliseconds

Hope it helps! Cheers!

Marked as helpful

0

Paul 120

@SageKyle

Posted

@fazzaamiarso Thanks a lot, this is really helpful. I'll definitely try it out.

0

@Kamasah-Dickson

Posted

Your solution looks great but I realised you used a different color for the design.

Also you can reduce the background color's opacity to match the design. It is also a good practice to use max widths on this challenges. On smaller devices your container is small so its contents don't have enough spaces around them.

Besides great job there👍 Happy coding👍💻

Marked as helpful

0

Paul 120

@SageKyle

Posted

@Kamasah-Dickson Thanks a lot. I'll keep that in mind for my next project

0

@Kamasah-Dickson

Posted

@SageKyle you are always welcome👍

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