After scrolling to the footer of the page I am not able to scroll upwards, my page gets stuck
I am feeling that that when this.oldScroll == this.scrollY I need to do something to fix this.
$(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>
I am expecting that I can scroll up once I reach the bottom of the page