Design comparison
SolutionDesign
Community feedback
- @brane10Posted 8 months ago
Hello, very good. I would recommend you to add some transition when opening and closing, to make it a little slower. And you could also optimize the logic in javascript using the ternary operator instead "if":
const imageSource = answer.classList.contains("hidden") ? "assets/images/icon-plus.svg" : "assets/images/icon-minus.svg"; btn.lastElementChild.setAttribute("src", imageSource);
I love your work :D
Marked as helpful0
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