jQuery - iPad/iPhone - enable scrolling after disabling it
dom-events, ios, ipad, jquery, scroll
Solution
This should work,
var disableScroll = false;
function disableScrolling() {
disableScroll = true;
}
function enableScrolling() {
disableScroll = false;
}
document.ontouchmove = function(e){
if(disableScroll){
e.preventDefault();
}
}
Problem
I have disabled scrolling on the iPad using: ``` function disableScrolling() { document.ontouchmove = function(e){ e.preventDefault(); } } ``` Is there a way to simply enable it again? It would be especially helpful in a function like: ``` function enableScrolling() { // enable scrolling } ```