解决方式是,我把左右滚动的事件添加到了Body上面,而上下活动的使用了DIV的垂直滚动。上代码:$("#body").swipe( { fingers:'all', swipeLeft:swipe1, swipeRight:swipe2} );
function swipe1(event, direction, distance, duration, fingerCount) {
tab_shipu(-1); //向左滑动你要执行的动作
}
function swipe2(event, direction, distance, duration, fingerCount) {
tab_shipu(1); //向右滑动你要执行的动作
}
然后上下滚动条我设置div的滚动;