0
我想對識別IPAD的觸摸事件做一個動作。 問題是,即使觸摸完成一次,觸發事件也會被多次調用。隨機識別的jquery手機觸摸事件
handleEvent: function (e) {
var that = this;
//console.log("---------------------------------handle event ");
switch(e.type) {
case START_EV:
if (!hasTouch && e.button !== 0) return;
that._start(e);
break;
case MOVE_EV: that._move(e); break;
case END_EV:
case CANCEL_EV: that._end(e); break;
case RESIZE_EV: that._resize(); break;
case 'mouseout': that._mouseout(e); break;
case 'webkitTransitionEnd': that._transitionEnd(e); break;
}
}
如何識別事件只有一次。
感謝, Vaibhav的