如何在向下滚动时重定向另一页面

时间:2016-12-28 13:03:58

标签: javascript html

$(window).scroll(function () {

    if ($(window).scrollTop() >= $(document).height() - $(window).height() - 10) {

        //infinite scrolling is the idea

    }

});
<div id="scrollwork" class="scroll-padder">
</div>

  

这是我的div标签。我想在主页上滚动,当我向下滚动时,我想使用java脚本在页面work.html上重定向

1 个答案:

答案 0 :(得分:0)

document.getElementById("scrollwork").onscroll=function(){window.location=redirecturl}