Created
January 18, 2019 13:37
-
-
Save dghez/7dc97b3ed9eb331e0c506d09ac1c8a3c to your computer and use it in GitHub Desktop.
Detect if is a 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
| export default function isTouch() { | |
| return 'ontouchstart' in document.documentElement | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment