WorthyD
6/2/2014 - 10:21 AM

DetectTouch.js

var canTouch = 'ontouchstart' in window;
var startEvent = canTouch ? 'touchstart' : 'mousedown';
var moveEvent = canTouch ? 'touchmove' : 'mousemove';
var endEvent = canTouch ? 'touchend' : 'mouseup';