Last active
August 6, 2016 13:28
-
-
Save danwarfel/5aa423d0e7cefa8c3f7e to your computer and use it in GitHub Desktop.
Detect a Touch Screen Device Using JavaScript, From http://codesr.thewebflash.com/2014/09/detect-touch-screen-device-using.html
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
// # Detect a Touch Screen Device Using JavaScript # | |
// From http://codesr.thewebflash.com/2014/09/detect-touch-screen-device-using.html | |
var isTouchDevice = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment