Question : js detect user mobile
Answered by : barisx
function is_touch_device() { return 'ontouchstart' in window // works on most browsers || 'onmsgesturechange' in window; // works on ie10
}
Source : https://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device/23493107#23493107 | Last Update : Thu, 07 Apr 22