I'm trying to apply a preventDefault to a div in iBooks to create an area in which none of the touch/drag events for turning pages work. So far I've only tried to prevent the touch events, but it isn't working. I may be completely wrong in my implementation here:
var area = document.getElementById('area');
function touchStart(event) {
event.preventDefault();
}
function touchMove(event) {
event.preventDefault();
}
function touchEnd(event) {
event.preventDefault();
}
function touchCancel(event) {
event.preventDefault();
}
area.addEventListener("touchstart", touchStart, false);
area.addEventListener("touchmove", touchMove, false);
area.addEventListener("touchend", touchEnd, false);
area.addEventListener("touchcancel", touchCancel, false);
Any hints as to why this isn't preventing the touch events would be gratefully received.