see if the user is on mobile then excute javaquery?

36 Views Asked by At

i was wondering if there is away for my website check if the user is using a mobile browser then if the user is to execute javaquery, and if not to use normal JavaScript

1

There are 1 best solutions below

0
csga5000 On

See: http://www.sitepoint.com/detect-mobile-devices-jquery/

Basically this should work:

if(jQuery.browser.mobile)
{
   console.log('You are using a mobile device!');
}