Design comparison
Solution retrospective
How i can improve JS code to auto-collapse all accordion if nothing is selected?
Community feedback
- @catherineisonlinePosted almost 2 years ago
Not bad! 😎 On the mobile version, the questions are aligned in the center which looks a bit messy, I would alight them to left. Also, wondered why did you use inputs? You aren't really submitting any values.
0@dev-mksinghPosted almost 2 years ago@catherineisonline actually accordion can be made simply without javascript as well, if we use
<input type="radio">
and group all the inputs then you'll find that it works really well as accordion, and it doesnt need any extra code from javascript. But because of the challenge i used javascript on inputs , i was in two minds while completing it. Yea i know we aren't submitting any values, but i guess its fine. I even tried to figure this out by searching in google and there i saw that we can make accordion in different manner. Though i'm gonna make this accordion again without using input elements. Thanks for your valuable comments and suggestions. Happy Coding!!!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