0

I have a button that links to a third party website. This site has features that do not work with mobile devices. What I want to create is when the button is pressed it checks your OS version and then based on the result will pass you through to the site or redirect you to another site that says something like you are not supported.

I would assume that this code would have to be constantly updated to detect new mobile OS versions. Is there any easier way to accomplish this by detecting the browser version? Do mobile browsers have their own user agent tag like ($.browser.mobilemozilla )?

I have been trying to do some research but I have been coming up short. Any ideas or a point in the right direction would be very much appreciated.

Omar
  • 32,160
  • 9
  • 67
  • 108
  • Use [Modernizr](http://modernizr.com) and then write the redirect into a conditional statement based off the Modernizr result. – APAD1 Jun 27 '14 at 16:33

1 Answers1

0

Check this library JS-Redirection-Mobile

EGN
  • 2,039
  • 4
  • 23
  • 37