jquery獲取的事件源貌似沒有常規(guī)寫法中的touches[0] pageX等這里說的常規(guī)寫法是addEventListener所以想問下不用addEvent,jquery怎么寫移動端事件 <div id="aaa" class="ccc">111</div> <div id="bbb" class="ccc">222</div> var aaa=(e)=>{console.log(e)}; var bbb=(e)=>{console.log(222)} $("#aaa,#bbb").bind({ 'touchstart':aaa, 'touchmove':bbb }) var ccc=document.getElementById("aaa"); ccc.addEventListener("touchstart",function(e){ console.log(e) })附一下代碼 方便大家復(fù)制查看 請大家指教
jquery移動端事件獲取事件源距離
胡子哥哥
2018-12-13 18:14:58