Skip to content

Instantly share code, notes, and snippets.

@fikrirasyid
Created July 20, 2014 13:15
Show Gist options
  • Save fikrirasyid/bf52bafb19735bc59c9a to your computer and use it in GitHub Desktop.
Save fikrirasyid/bf52bafb19735bc59c9a to your computer and use it in GitHub Desktop.
Simplest Way To Check Mobile Device Using Js
function is_touch_device() {
return 'ontouchstart' in window // works on most browsers
|| 'onmsgesturechange' in window; // works on ie10
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment