How to use iScroll
1) It is necessary to prevent the behavior of standard touch events by default. It is easy to do this by adding preventDefault () to the touchmove event.
2) Initialize the iScroll object in DOMContentLoaded or when the window loads.
Change your code to,
function loaded() {
document.addEventListener('touchmove', function(e){ e.preventDefault(); });
myScroll = new iScroll('wrapper');
}
document.addEventListener('DOMContentLoaded', loaded, false);
Hope this helped.
source
share