I ended up moving on to something like this:
$('#logo, #left_nav li').css({ opacity: 0.6 }); $('#logo, #left_nav li').hover(function(){ $(this).stop().animate(); $(this).animate({ opacity: '0.99'}, 250); },function(){ $(this).stop().animate(); $(this).animate({ opacity: '0.6'}, 250); });
The background image of these elements is 33% transparent.
I set the opacity for each element to 0.6 (on document.ready) to get a transparency of 20%. The logo has been modified to have a certain opacity relative to this value.
In hover mode, I set the opacity back to its full value and animate the change. The logo disappears to 100% opacity, the background disappears to 33% opacity. There is also some stop () code to prevent an unwanted mix of effects.
I will add something similar for inline text links. There is not enough code to bother me, especially if there is no cleaner way to get the same effect for all links in jQuery.
source share