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. 回答1: You need to wrap the hex triplet in a string, change this: color: #ffffff to this: color: "#ffffff" 回答2: The basic problem is probably that you don't know jQuery's / JavaScript's notations, writing #ffffff would get