Skip to content

Instantly share code, notes, and snippets.

@kimtrien
Created September 19, 2016 02:38
Show Gist options
  • Save kimtrien/a01c0addcdbdf0a0b20acef2a2e3f1b8 to your computer and use it in GitHub Desktop.
Save kimtrien/a01c0addcdbdf0a0b20acef2a2e3f1b8 to your computer and use it in GitHub Desktop.
Detect Mobile Javascript
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
// some code..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment