I have a jQuery function that will change the CSS of the .flavor box with toggleClass and also add some text to the bottom. I want to change this so that when I click my box again (it is already active), the .active-text disappears also. How can I do this? Thanks!
$(".flavor").click(function(event) {
$(this).toggleClass("flavor-active");
$(this).find('.active-text').css('visibility', 'visible');
});