how to check the device with js code example
Example 1: how to detect device javascirpt
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
// some code..
}
Example 2: javascript get device
window.navigator.userAgent