This code disable all scrolling:
document.ontouchmove = function(event) {
event.preventDefault();
}
But how to disable only vertical scroll?
This code disable all scrolling:
document.ontouchmove = function(event) {
event.preventDefault();
}
But how to disable only vertical scroll?
have you tried
yourdiv.onscroll = function(){
this.scrollTop = 0;
this.scrollLeft = 0;
}
of course this may still show scrollbars, best to use css