Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
I am most proud of using javascript on the images.
What challenges did you encounter, and how did you overcome them?I had a little trouble figuring out how to change the images when they are clicked on. I used the background image property to solve this.
What specific areas of your project would you like help with?Repetitive javascript code.
Community feedback
- @SvitlanaSuslenkovaPosted 2 months ago
it's better to have onClick events for button. Like <button> here img or background for button </button>. After that you should select buttons(const buttons =document.querySelectorAll(".classofbutton");) and add forEach function or a loop for them. Then use something like: let text = this.previousElementSibling; then add styles for text.
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