滚动到页面的页脚后,我无法向上滚动,页面被卡住
我觉得当this.oldScroll == this.scrollY时,我需要做一些事情来解决此问题。
$(window).scroll(function () {
if (this.oldScroll > this.scrollY) {
scrollDirection = "up";
userScrolled = true;
}
else if (this.oldScroll == this.scrollY) {
scrollDirection = "none";
userScrolled = false;
} else {
scrollDirection = "down";
userScrolled = true;
}
this.oldScroll = this.scrollY;
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
我希望到达页面底部时可以向上滚动