jquery - Issue with fading in a scroll to top -
i have site fixed side bar containing site header , site content scrolls on right. want fade in scroll top button within header (sidebar) using similar method http://gazpo.com/2012/02/scrolltop/ doesnt seem triggering, site having fixed sidebar?
how re-write jquery out scrolling content , not entire page scrolling
<script type="text/javascript"> $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrolltop() > 100) { $('.scrollup').fadein(); } else { $('.scrollup').fadeout(); } }); $('.scrollup').click(function(){ $("html, body").animate({ scrolltop: 0 }, 600); return false; }); });
thanks
it 1 of many things (i'm streakycobra - jsfiddle useful here)
did check "scrollup" class of button, , not "scrollup"?
what css properties .scrollup? display set none, or opacity 0? if so, fade in , fade out can not affect it, fading in or out not visible.
Comments
Post a Comment