I want to do two things:
div.masterI know you can disable the elastic scrolling using the following:
document.addEventListener('touchmove',function(e) { e.preventDefault() },false);
However this disables all scrolling, not just the elastic scrolling. I thought maybe that you could just enable scrolling again for just the div.master but I'm not sure how you would do that.

Disable your page’s default scrolling with:
document.body.ontouchmove = function(e) { e.preventDefault(); };
or
document.body.addEventListener('touchmove', function(e) { e.preventDefault(); }, false);
and enable scrolling with some CSS:
.scrolling {
overflow: auto;
-webkit-overflow-scrolling: touch;
}
To completely remove elastic scrolling you’ll have to wrap the scrolling div inside another scrolling div like that:
<div class="scrolling">
<div class="scrolling">
// Your content goes here
</div>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With