Design comparison
Solution retrospective
This is the best accordion i've made so far.
This is very Beginner friendly, and easy to understand code.
Also if you uncomment the code, you can get the functionality of opening of multiple accordion at same time.
Hope you liked it :-) Any feedback would be appreciated.
Community feedback
- @yozidstPosted 11 months ago
Hi 👋,
Awesome job on this challenge! Something I noticed; maybe it was intentional was if I click a question or the (+), (-) on an opened accordion, the accordion doesn't react or collapse. The collapse function seems to be only enabled by clicking on the opened answer or another question's question or its (+) (-) symbol. Because the questions change color on hover I hoped that clicking an opened question would also have the collapse functionality on its own. Just thought I would let you know, cheers! 👋
0@exist08Posted 11 months ago@yozidst thanks for the comment. that's why i wrote that, if you want toggle functionality(again clicking to collapse) in accordion, you can uncomment the commented code. and btw the simple behaviour of collapsing was intentaional because i decided earlier to make this without js.
1
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