How to prevent document scrolling but allow scrolling inside div elements on websites for iOS and Android?
问题 I created a website with jQueryMobile for iOS and Android. I don't want the document itself to scroll. Instead, just an area (a <div> element) should be scrollable (via css property overflow-y:scroll ). So I disabled document scrolling via: $(document).bind("touchstart", function(e){ e.preventDefault(); }); $(document).bind("touchmove", function(e){ e.preventDefault(); }); But that will also disable scrolling for all other elements in the document, no matter if overflow:scroll is set or not.