Interactive Rating Component using HTML, CSS and Javascript
Design comparison
Solution retrospective
How do I add a delay period after the user clicks on submit before showing the thank you section.
Community feedback
- @fazzaamiarsoPosted over 2 years ago
Hello Paul! Nice solution!
To add delay you can use
setTimeout
. Please refer to this resourcesetTimeout( () => { 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 helpful0@SageKylePosted over 2 years ago@fazzaamiarso Thanks a lot, this is really helpful. I'll definitely try it out.
0 - @Kamasah-DicksonPosted over 2 years ago
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 helpful0@SageKylePosted over 2 years ago@Kamasah-Dickson Thanks a lot. I'll keep that in mind for my next project
0
Please log in to post a comment
Log in with GitHubJoin 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