Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

All comments

  • Blerim 270

    @approved4me

    Submitted

    I am still struggling with the JavaScript for the accordion. I have managed to close other items, when another accordion item is opened, but I haven't found out how to close the current accordion item, when clicking it directly.

    If anyone knows how to close the active menu when clicking on it, please let me know.

    Thanks for viewing.

    Hyeon Park 350

    @hkparkjs

    Posted

    Hi, Blerim 👋

    Good work on this challenge! 👍

    I had the same issue you have, and I used .classList.add()/remove() directly instead of using toggle() to solve the problem.

    For the detail, you can refer to my challenge page. https://www.frontendmentor.io/solutions/faq-accordion-card-YtmRMSmpPL

    I hope my comment is helpful for you :)

    Have a nice day! ✨

    Marked as helpful

    0