If you download the touch library from jQueryMobile. Just create jQueryMobile only with your touch library. Import it into your project. Then you have a map like me ...
var hasTouch = 'ontouchstart' in window;
var humanEvents = {
DOWN: (hasTouch) ? goog.events.EventType.TOUCHSTART : goog.events.EventType.MOUSEDOWN,
OVER: (hasTouch) ? goog.events.EventType.TOUCHSTART : goog.events.EventType.MOUSEOVER,
MOVE: (hasTouch) ? goog.events.EventType.TOUCHMOVE : goog.events.EventType.MOUSEMOVE,
UP: (hasTouch) ? goog.events.EventType.TOUCHEND : goog.events.EventType.MOUSEUP,
OUT: (hasTouch) ? goog.events.EventType.TOUCHEND : goog.events.EventType.MOUSEOUT,
CLICK: (hasTouch) ? "tap" : goog.events.EventType.CLICK
};
source
share