When one of the buttons is clicked the button fades to the ".active" class and a background color is applied. When another button is clicked, the active state from the button is removed and the clicked button becomes active. This works fine except if I click the currently active button again. When it is active is should become inactive. How do I do this?
Note: It may sound not logic do to this, but the buttons triggers a slide out. When the slide out is active the button is colored, when this same active button is clicked again, it triggers the slide out to slide back in and the button must become inactive (no color). Only one button can be active at a time.