SyntaxFix
Write A Post
Hire A Developer
Questions
Found testing for window.Touch didn't work on android but this does:
function is_touch_device() { return !!('ontouchstart' in window); }
See article: What's the best way to detect a 'touch screen' device using JavaScript?