Skip to content

Instantly share code, notes, and snippets.

@colinrotherham
Created December 2, 2016 15:47
Show Gist options
  • Save colinrotherham/8e71ebb21ae99a32b3cb17fbf7729f34 to your computer and use it in GitHub Desktop.
Save colinrotherham/8e71ebb21ae99a32b3cb17fbf7729f34 to your computer and use it in GitHub Desktop.
Touch enabled?
return ('ontouchstart' in window) || navigator.msPointerEnabled || window.DocumentTouch && document instanceof DocumentTouch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment