2016-12-28 39 views
-3

我如何能在另一页上重定向向下滚动

$(window).scroll(function() { 
 

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

 
     //infinite scrolling is the idea 
 

 
    } 
 

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

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

+0

的JS是无效的。 –

+0

感谢您的回复,请给我对JS @alldani –

+0

欢迎!请参阅:[问] | [mcve] |还请查看[帮助]。 –

回答

0

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

+0

谢谢@灵魂收割者 –

相关问题