FAQ accordion card component made with vanilla JS and flexbox

Solution retrospective
I struggled with sizing the image/background to fit the mockup. In order to achieve the accordion effect without the use of JavaScript, would the details
tag be used? Also I'm not sure about my use of the getElementById
for accordion menu items being indexed by number (for instance, if there were a lot more items to be added). Thank you for any suggestions to make my code more concise/clean!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Elizabeth Sotomayor's solution.
Join 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