Alex Rivera | Logout

jQuery animate color change

Asked 2011-08-06T13:41:42.273
13

I'm trying to animate a link color change from the current color to an other color.

$(window).load(function(){
    $('.article-preview h1 a').hover(function(){
        $(this).animate({
            color: #ffffff
        }, 1500);
    });
});

For some reason it's not working. I'm using the jQuery color plugin.

Edit
Report

1 Answer

15

You need to wrap the hex triplet in a string, change this:

color: #ffffff

to this:

color: "#ffffff"
answered 2011-08-06T13:49:10.110

Your Answer