I'm trying to make an article
add a class while a menu is open.
So, when the button is clicked, this will show the menu and also certain item (the article
) should get the class padded
, and when we press the button again, the class padded
must be removed.
Now, it's adding the class, but not removing it when the button is clicked again
http://www.bootply.com/xcfWMYveNe
Cheers
Use this jQuery method called "toggleClass"
$('.tab-pane.active').toggleClass("padded");