Skip to content

Commit

Permalink
Scrolling on mobile, fixes hmfaysal#1, fixes hmfaysal#8
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Negri committed Jun 23, 2015
1 parent 4720f6e commit b471b82
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions assets/js/vendor/post-header-animationsb146.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,14 @@
}
}

function touchmove(e) {
preventDefault(e);
}

function wheel(e) {
// for IE
//if( ie ) {
//preventDefault(e);
//}
}

function disable_scroll() {
window.onmousewheel = document.onmousewheel = wheel;
document.onkeydown = keydown;
document.body.ontouchmove = touchmove;
window.addEventListener( 'touchmove', scrollPage );
}

function enable_scroll() {
window.onmousewheel = document.onmousewheel = document.onkeydown = document.body.ontouchmove = null;
window.removeEventListener( 'touchmove', scrollPage );
}

var docElem = window.document.documentElement,
Expand Down Expand Up @@ -147,4 +136,4 @@

}

})();
})();

0 comments on commit b471b82

Please sign in to comment.