課程
/前端開發(fā)
/WebApp
/移動端的WEB相冊
好糾結(jié)啊。。。不太可能是庫的本身問題吧
2015-04-01
源自:移動端的WEB相冊 3-7
正在回答
這是代碼片段, 主要是document的默認(rèn)事件, 需要自己禁止, 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); })
我也是
同問,我也遇到了同樣的問題。
舉報
本課程通過一個移動端相冊案例,帶您一步步了解移動端框架
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-02-22
這是代碼片段, 主要是document的默認(rèn)事件, 需要自己禁止, 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);
})
2015-12-23
我也是
2015-05-17
同問,我也遇到了同樣的問題。