function isTouchDevice() {
return 'ontouchstart' in document.documentElement;
}
if (isTouchDevice()) {
// on Mobile
}
else {
// on Desktop
}
function isTouchDevice() {
return 'ontouchstart' in document.documentElement;
}
if (isTouchDevice()) {
// on Mobile
}
else {
// on Desktop
}