I need to animate from transparent to color, but when I do, I get a white flash. I assume this is due to the fact that there is no base color for the animation. How do I get around this?
$('#nav a').hover(function() {
$(this).animate({
'background-color' : $(this).attr('data-background'),
'color' : $(this).attr('data-rollover')
}, 900);
});
<a style="color:#ffff00; " data-background="#000066" data-color="#ffff00" data-rollover="#000000" href="index.php?p=1" ><span >Home</span></a>
source
share