I have a dropdown menu that works by Classic CSS hover
if you've opened the menu with a click event
, i need the hover effect to be removed but i can't because you're still hovering over the menu the menu doesn't disappear
until you hover off
which isn't ideal. I also tried using .hide()
but then that messes with CSS hover functionality.
Is there a way in jQuery to remove the CSS hover activation of an element?
$("ul.nav > li").click(function(e) {
var url = $(this).attr("url");
$(this).css('background', '#bbb');
if( url == 'logoutServlet') {
$.get('logoutServlet');
window.location = "/a";
}else{
$("#content").html('Loading...').load(url);
}
});