Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery animate color change

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.

like image 394
wowpatrick Avatar asked Aug 06 '11 13:08

wowpatrick


1 Answers

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

color: #ffffff

to this:

color: "#ffffff"
like image 161
Baversjo Avatar answered Oct 20 '22 11:10

Baversjo