@Shalom2935
Posted
remove the charset in your script element
Marked as helpful
Any suggestion on how to improve js code.
@Shalom2935
Posted
remove the charset in your script element
Marked as helpful
@visualdenniss
Posted
Hello,
As for best practice, I'd suggest adding a cursor: pointer; to the buttons to indicate interactivity to the user and therefore improving the user experience as well.
Regarding JS, i think instead of creating all of those create new elements on the page and innerHTML etc. you can simply have your html written for the thank you page, but simply change it from display none to display block or similar with an event handler, while making the rating section display none. You can use also data attributes to store data etc.
Hope you find this feedback helpful!
Marked as helpful
@ChelseaChanu
Posted
@visualdenniss Thanks a lot for the advice. The code looks much cleaner😊.
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