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

  • Juan Pujol• 70

    @joanpujol

    Posted

    First of all, great-looking solution!

    On the JS side, one way to simplify your code would be to use a click listener for each item that toggles an active class for that item.

    faqItems.forEach(item => {
        item.addEventListener("click", () => {
           item.classList.toggle("active");
        });
     }); 
    

    I hope it helps.

    1