Jquery addClass and removeClass
Just see below code
$(“.product-info”).click(function(){
if(!$(this).hasClass(“activeBar”)) {
$(this).addClass(“activeBar”);
} else {
$(this).removeClass(“activeBar”);
}
});
Another example ;
$(“.product-info”).click(function(){
$(this).toggleClass(“activeBar”);
});
hope it will help you.