javascript - Detecting if you are on a desktop -


i'm building app touch screens , has on screen keyboard them use. works wonders desktop computers, not mobile devices have built in keyboards.

i have been looking around see if there way detect if on desktop or mobile, have seen has been deprecated. there way so? can enable library if on desktop computer.

you can accomplish doing:

if(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.useragent)){     //your code mobile devices } 

here fiddle: http://jsfiddle.net/mnbw23gg/


Comments

Popular posts from this blog

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -

html - grunt SVG to webfont -