Submitted over 2 years ago
Interactive rating component using html, css, and javascript
@Alifkm
Design comparison
SolutionDesign
Solution retrospective
This is my first time using javascript dom. Is there something I can do to improve my code? Any feedbacks are welcome
Community feedback
- @SemandrPosted over 2 years ago
Perhaps adding a smooth transition on hover with the mouse would be nice... Many html elements are missing classes. As for the JavaScript code, the same task can be solved in many ways, the main thing is what works :)
Marked as helpful1 - @tesla-ambassadorPosted over 2 years ago
Hey Alif. Congrats on completing this wonderful solution! It's really flawless and I really like it!
- For a person using JavaScript DOM for the first time, that's some really wonderful work you've got there. I looked at your code and it is good! Only thing I can say is that if you want to refactor it and use less lines, you might want to different classes where you add your desired styles and then you use
element.classList.add('class')
instead of styling your components from JavaScript. It will help you use less lines of code! Happy coding and keep up the great work!
Marked as helpful1 - For a person using JavaScript DOM for the first time, that's some really wonderful work you've got there. I looked at your code and it is good! Only thing I can say is that if you want to refactor it and use less lines, you might want to different classes where you add your desired styles and then you use
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