課程
/前端開發(fā)
/WebApp
/移動端的WEB相冊
老師, 為這什么這個效果在手機上不能滑動,求原因
2015-04-22
源自:移動端的WEB相冊 3-9
正在回答
這是代碼片段,?主要是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號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-02-22