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

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -