Created
June 13, 2013 12:35
-
-
Save liamr/5773339 to your computer and use it in GitHub Desktop.
Touch Event Helper
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
function is_touch_device() { | |
return !!('ontouchstart' in window) // works on most browsers | |
|| !!('onmsgesturechange' in window); // works on ie10 (apparently not) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment