I am writing a web app in HTML and JavaScript for use on an iPhone. What I would like to achieve is preventing the app from elastic scrolling (scrolling past the pages extents a
So when you have scroll content in body & want to disable elastic scroll use:
let scrollToTop = $(window).scrollTop(); if (scrollToTop < 0) { // do something here }
Because elastic scroll will always have negative value