swipeLeft 和swipeRight在微信内置浏览器上不能滑动啊!求解
swipeLeft 和swipeRight在微信内置浏览器上不能滑动啊!求解
swipeLeft 和swipeRight在微信内置浏览器上不能滑动啊!求解
2015-07-22
不是失效, 没有失效, 主要是document的默认事件, 需要自己禁止, zepto 没有全给你做了 这是代码片段, 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); })
举报