Skip to content

Instantly share code, notes, and snippets.

@wrongkitchen
Forked from keriati/detectMobile.js
Created September 26, 2012 05:11
Show Gist options
  • Save wrongkitchen/3786216 to your computer and use it in GitHub Desktop.
Save wrongkitchen/3786216 to your computer and use it in GitHub Desktop.
Javascript: Mobile Browser Detection
function detectMobile() {
return (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment