$(document).ready(function(){
$("#menu a").hover(function(){
$(this).animate({opacity: 0.25}, function(){
$(this).animate({opacity: 1});
});
});
});
I applied this effect to my menu, so when the mouse goes over the link it shows this fade effect, but when the mouse is released from it, the effect plays again. It shouldnt. It should only play once when the mouse is over the link, not another time when the mouse is out.
.hover()has two callbacks, one formouseenterand one formouseleave.You’re probably better off with
mouseenter: