2016-12-28 66 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

謝謝@靈魂收割者 –

相關問題