2012-10-20 21 views
1

我試圖從http://soworldwide.org/ jsfiddle在網站上看到的圖像頭視差效果。現在我想淡出/並在開始滾動時放在大標題中。但頭條消失得很厲害,只能平穩地消失......當我消失時,我怎樣才能淡化它呢?嘗試在這裏看到的jsfiddle視差圖像標題:http://soworldwide.org/

http://jsfiddle.net/NQHmw/3/


$(window).scroll(function(){ 

     if($(window).scrollTop()<20){ 
      $('.headline').stop(true,true).fadeIn("slow"); 
     } else { 
      $('.headline').stop(true,true).fadeOut("slow"); 
     } 
    }); 
+0

請更新您的問題實際上匹配問題的標題。 – Odi

回答

0

這似乎是一個2歲多的問題,但停止(/淡出文本效果)功能被阻斷褪色。快來看我們在這裏的:

$(window).scroll(function(){ 
    if($(window).scrollTop()<20){ 
    //$('.headline').stop(true,true).fadeIn("slow"); 
    $('.headline').fadeIn("slow"); 
    } else { 
    //$('.headline').stop(true,true).fadeOut("slow"); 
    $('.headline').fadeOut("slow"); 
    } 
}); 

http://jsfiddle.net/NQHmw/60/