Created
May 23, 2013 09:28
-
-
Save Dammmien/5634910 to your computer and use it in GitHub Desktop.
Detect Touch Device
This file contains hidden or 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
var ua = navigator.userAgent, | |
isApple = /iPad/i.test(ua) || /iPhone/i.test(ua), | |
isAndroid = ua.toLowerCase().indexOf("android") > -1; | |
if(isAndroid || isApple) { | |
// do something ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment