Created
July 24, 2011 02:25
-
-
Save timothyclifford/1102131 to your computer and use it in GitHub Desktop.
Detecting iPhone & iPad using Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) | |
{ | |
// Do something for iPhone / iPad / iPod here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment