jQuery - IF then Remove class on .hover
- by danit
I have the following jQuery function:
$(function(){
if ($(".menu li").hasClass("active")) {
$(".active").css("margin-top", "6px");
}
});
This is applied to a CSS/jQuery menu, which expands and contracts when each menu item is hovered over. The onClick event adds a margin-top of 6px to give…