手机上左右滑动无效。清楚默认事件用了return false也无效。哪位大神知道,求教!
3 回答
我这样就好了, 主要是 e.preventDefault()
container.delegate('li', 'tap', function () {
var _id = cId = $(this).data('id');
loadImg(_id);
document.addEventListener('touchmove', stopPrevent, false);
});
function stopPrevent(e) {
e.preventDefault();
return false;
}
var lock = false;
largeContainer.tap(function (e) {
$(this).hide();
document.removeEventListener('touchmove',stopPrevent, false);
})举报
0/150
提交
取消