Skip to content

Instantly share code, notes, and snippets.

@albburtsev
Created January 25, 2011 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albburtsev/794796 to your computer and use it in GitHub Desktop.
Save albburtsev/794796 to your computer and use it in GitHub Desktop.
Simple touch device detection
// See from http://chris-barr.com/files/touchScroll.htm
var isTouchDevice = function(){
try {
document.createEvent("TouchEvent");
return true;
} catch(e) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment