Responsive Interactive Rating component main - HTML/CSS/JS
Design comparison
Solution retrospective
Hi 👋 My problem in this challenge is that when it comes to clicking "submit", the user has to click 2 times (instead of 1) to submit the review and for the "thank you" page to pop up.
So if someone can tell me where I went wrong or how to improve this specific part, I would be very grateful!
edit: problem resolved thanks to @anxhelino :)
Community feedback
- @anxhelinoPosted almost 2 years ago
Hello, the solution to your problem would be to get rid of the if else statement on your showThanks function. Just leave it like this : function showThanks() { var divShowThanks = document.getElementById("thanks-state"); var divHideRating = document.getElementById("rating-state");
divHideRating.style.display = "none"; divShowThanks.style.display = "block"; getRating(val); }
Marked as helpful1@keziarktsPosted almost 2 years agoHi @anxhelino, your solution works really well! Thanks a lot 😊
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