Question : check if the device is mobile or desktop
Answered by : nutty-newt-3630j4ewyjtn
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // some code..
}
Source : https://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device | Last Update : Thu, 09 Jul 20