Fade text when page scrolls
问题 I have this basic example working: http://www.mharrisweb.co.uk/tester.htm Is there anyway I can get the fading text to scroll slightly, to create a more fluid tranisiton? Like this site: http://themetrust.com/demos/hero/ Many thanks 回答1: use this var divs = $('.social, .title'); $(window).scroll(function(){ if($(window).scrollTop()<10){ divs.stop(true,true).fadeIn("fast"); } else { divs.stop(true,true).fadeOut("fast"); } }); 回答2: Just manipulate the margins of the text like you did the