安卓手机页面中的拖拽和屏幕的左右滑动冲突
slideshowBox是你需要手动滑动的父类,禁止当前区域的浏览器默认事件不会影响浏览器的左右滑动前进后退功能,而且所有浏览器均适配。
$('.slideshowBox').each(function(index, el) {
el.addEventListener('touchmove', function (event) {
event.preventDefault();
}, false);
});
slideshowBox是你需要手动滑动的父类,禁止当前区域的浏览器默认事件不会影响浏览器的左右滑动前进后退功能,而且所有浏览器均适配。
$('.slideshowBox').each(function(index, el) {
el.addEventListener('touchmove', function (event) {
event.preventDefault();
}, false);
});