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 *