STYLE SWITCHER

jquery how to check if the scroll is almost down

$(window).scroll(function() {
var windowsHeight = $(document).height() - $(window).height();
var currentScroll = $(document).scrollTop();

//if I scroll more than 80%
if( ((currentScroll *100) / windowsHeight) > 60){
$(".outer-slider").animate({right:"0"},150);
}
});

Recent Article

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Keep your skills sharp, get informed.

    Subscribe to our mailing list and get interesting stuff and updates to your email inbox