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

r - Trouble relying on third party package imports in my package -

Payment information shows nothing in one page checkout page magento -