Jackson t
Jackson t

Reputation: 23

see if the user is on mobile then excute javaquery?

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

Upvotes: 0

Views: 34

Answers (1)

csga5000
csga5000

Reputation: 4141

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!');
}

Upvotes: 0

Related Questions