skip to Main Content

Can WordPress & jQuery toggle click twice?

This is my code (toggle menu): $(function () { $('#menu li').click(function () { $('#menu li').removeClass("active"); $(this).toggleClass("active"); }); }) Works perfectly. But... If I click on one element and click on it again, the toggle does not close. I would like…

VIEW QUESTION
Back To Top
Search