Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * ::::::: Scroll Down
- */
- var $viewportHeight = $(window).height();
- var $target_down = $('#target-down');
- // Download the viewport
- $target_down.click(function(event){
- $('html, body').animate({scrollTop: '+=' + $viewportHeight}, 800);
- });
- $(window).scroll(function() {
- // Check if reach bottom of the page
- if($(window).scrollTop() + $viewportHeight == $(document).height()) {
- $target_down.fadeOut( 500 );
- } else {
- $target_down.fadeIn( 500 );
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement