I have a function that when user click first it will add a class then in second click it will remove the class, and again.. so on.. it's like when first click it means active, then second is not active. Just like that.
Here is my code:
$('.sub-nav-add').css('display','none');
$('.nav-add').click(function(){
$('.sub-nav-add').slideToggle(200);
$('.box-add').addClass('sub-nav-active');
});
How can I add a second click function that will removeClass?