Interactive Rating Component using HTML form and JavaScript

Solution retrospective
I used the form element for the rating card. At first I had an input element with type submit at the bottom of the form. This would both submit the form an via JS go the next card. When submitting the form however, the page would refresh and the "Thank you" card wouldn't be shown. Since I haven't got a URL to submit the form to, the page would just refresh upon submitting.
In what way could I keep the submit button within the form without the page refreshing upon submitting?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Mark's solution.
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