javascript - What happens in the DOM when the page is scrolled too far on mobile? -
i curious if detectable happens in dom on mobile browser when @ top or bottom of page , try scroll further, or if detectable through javascript.
i checked on macbook pro laptop , yes, can detect this.
i used jquery window's scrolltop() property , return negative value when scrolled above page.
my code:
$(window).on("scroll", function( console.log( $(this).scrolltop() ); )};
i assume can bottom scrolling getting viewport's height , add scrolltop value.
Comments
Post a Comment