I'm using iScroll on a single page in my Jquery Mobile document because it has some touch features and I wanted to prevent the user from accidentally scrolling away from the main content. So I add the event listener
document.addEventListener('touchmove', function(e) { e.preventDefault(); }, false);
But I want this to only effect the main page where I have my iScroll enabled. So I figured I'd use the pageload
event to bind the event listend to the specific page I needed.
$('#scroll').bind('pageload', function(){
document.addEventListener('touchmove', function(e) { e.preventDefault(); }, false);// JavaScript Document
});
But I still cant get it to work on the one page I want. Any ideas?