when the page loads i would like the span overlay to fade in from full #000 to opacity 0.2
and then stay at 0.2 to which when i hover it goes to opacity 0
this is the code i have at the moment
$(function () {
$('ul li a').append('<span id="load"></span>');
$('span').css('display', 'block').fadeOut(3400);
$('span') .animate ({
"opacity" : .2
});
$('span') .hover(function() {
$ (this) .animate ({"opacity": 0});
}, function () {
$(this).stop() .animate ({"opacity": .2 });
});
});
here is an example
Something like this?