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.
I am new to jquery, so already excuse me for asking basic questions. I did search the forum but do not really find what I am looking for, although I am sure it must exists somewhere already.
I would like to make a menu with large buttons horizontally positioned next to each other. When one of the buttons in clicked that button should color (as being active) and a slide out should appear undernead the menu with a more detailed submenu and some images. The slide should remain open until another botton of the menu is clicked or when one of the submenu links in the slide out is clicked.