这是我正在处理的页面:http://dsa.dartmouth.edu/。幻灯片下面是四个面板,可以在悬停时更改颜色。背景颜色工作正常,但标题颜色在变成白色后从未回到其黑色。下面是控制这个的javascript - 我怎样才能让h2文本在转出时变回黑色?除非你有jQuery UI太Jquery淡入淡出问题
$featured_control_item.hover(function(){
if (! $(this).hasClass('active-slide')){
$(this).find('.et_slide_hover').css({'display':'block','opacity':'0'}).stop(true,true).animate({ 'opacity' : '1' }, featured_controllers_opacity_speed);
$(this).find('.controller').find('h2').css({'color':'white'}).stop(true,true).animate({ 'color' : '#656464' }, featured_controllers_opacity_speed);
}}, function(){
$(this).find('.et_slide_hover').stop(true,true).animate({ 'opacity' : '0' }, featured_controllers_opacity_speed);
$(this).find('.controller').find('h2').stop(true,true).animate({ 'color' : '#656464' }, featured_controllers_opacity_speed);
});