Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save weblancaster/1fef29a957677c1bca57 to your computer and use it in GitHub Desktop.
Save weblancaster/1fef29a957677c1bca57 to your computer and use it in GitHub Desktop.
Javascript Mobile device detection
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