Ever want to have your links fade from one color to the next?
On a standard link hover, you get two colors: the normal link color and the hover color.
But thanks to jQuery and the Color Animations plugin, you can cross-fade to colors.
$(function() {
$("a").hover(
function () {
if ($(this).is(":animated")) {
$(this).stop().animate({color:"#ff0000"}, 500);
}else{
$(this).animate({color:"#ff0000"}, 1500);
}
},
function () {
if ($(this).is(":animated")) {
$(this).stop().animate({color:"#0000ff"}, 500);
}else{
$(this).animate({color:'#0000ff'}, 1500);
}
});
});