I am trying to improve the touchwipe js. where i want to hanlde only horizontal scroll and if its any vertical scrolling comes up let browser handle my fix works fine in ios5 but in ios6 its getting frezee any idea ?
http://archive.plugins.jquery.com/project/Touchwipe-iPhone-iPad-wipe-gesture
Please find code following
function onTouchMove(e) {
//var e = (e.changedTouches != undefined)? touches[0] : e;
if(isMoving) {
var x = e.touches[0].pageX;
var dx = startX - x;
if(Math.abs(dx) >= config.min_move_x)
{
if(config.preventDefaultEvents) {
e.preventDefault();
}
cancelTouch();
if(dx > 0) {
config.wipeLeft();
}
else {
config.wipeRight();
}
return false;
}
else {
console.log('y moving.. ');
// attachTouch();
return true;
}
}
}
Just adding some more details . I am trying to animate my list horizontal by BXslider and its works fine want to support the touch events so added the touch wipe jquery . But adding it give 1 issue that's horizontal scroll animation works ok but touch page vertical scroll not works.
So i tried to fixed issue by return true; if its only Y move, at touchwipe js. This fix working fine on android4 and ios5 but fails in ios6 if i scroll my page vertically little aggressively(moving finger in oval/circle for 4-5 sec) its freez bxslider animation.
further debugging give inside that bxslider.gotoNextSlide()-> calling the Jquery $parent.animate() method for sliding which stop working in ios6 after aggressive scroll.
Now i m stuck and not able to understand why this animate() stops working ??
EG >>>
http://jsfiddle.net/qtCHx/