Design comparison
Solution retrospective
my inputs got playful (xD) and i not stay convinced about my js code, any advice is good :3
Community feedback
- @A-amonPosted over 3 years ago
Hello! It looks good and so is the responsiveness~
I have a few suggestions:
-
Instead of changing image's color in JS by switching images, try using SVG images. This way, you can change the image's fill property in CSS on hover.
-
Listen to "submit" event instead of "keyup" when handling form submission. P.s. Add event.preventDefault() when doing that, so that it doesn't reload the page upon submission.
-
Add classes to classList instead of directly setting the styles in JS. Then, set the styling for the class in CSS. This way, CSS logic will stay within CSS and JS' within JS.
Marked as helpful1 -
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