Show and hide an element when scrolling to the bottom of a page

$(window).scroll(function(){ var threshold = 200; // number of pixels before bottom of page that you want to start fading var winPos = $(window).scrollTop() / threshold; if( winPos <= 0 ){ $(".mobile-footer").stop().removeClass('fadeIn'); } else { $(".mobile-footer").stop().addClass('fadeIn'); } });

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.