@JimTK16
Posted
Hi Yarcefm, I have just finished this challenge. My solution for keeping only one question open is as below:
- Creat an array of question.
- Loop through the array and select the questions that aren't active with the filter() method. Then remove the active class from all of them.
- Finally, we can toggle the active class of the question that the user clicked. Link to my github solution: https://github.com/JimTK16/faq-accordion. Hope it helps
Jim