I have an ul li menu which I want to make only the link with the :hover state with the opacity 1.0 the others will be set to something like 0.5. So each time the mouse is over the link it keeps its opacity, 1.0, and the others get their opacity changed to 0.5.
Is there a somenthing linke a !:focus, !:hover or !:active in jQuery? I see that there is blur() but it doesn’t fit the case, I guess, because I need those that are not active and not those that lost focus.
–edited–
It work better with :not() instead of .not().
So this is working:
$('#menu > li > a').bind({
mouseenter: function(){
$('#menu > li > a:not(:hover)').fadeTo('slow', 0.5).stop(true,true);
},
mouseleave: function() {
$('#menu > li > a').fadeTo('slow', 1.0).stop(true,true);
}
});
Hey, did you try using .not()
should be something like this:
.not()