$('#slider').hover(function()
{
$('#LayerHover').fadeTo(400, 0.4);
}, function()
{
$('#LayerHover').fadeOut(400);
});
This functions just like u expect the code to work, but when you hover over it and out and in etc. at a fast pace the fading will get buggy because its still finishing its previous fadein/fadeout calls. How do you cancel the “old calls”?
You can cancel queued animations with .stop(). For example:
http://api.jquery.com/stop/