Detect browser, operating system with jQuery
By Hector Peña In jQuery, Resources Posted No Comments
Returns true if the current user agent is a version of Microsoft's Internet Explorer. Supports all versions of IE, including IE 11.
$.browser.msie;
Returns true if the current user agent is a version of a WebKit browser (Safari, Chrome, and Opera 15+)
$.browser.webkit;
Returns true if the current user agent is some version of Firefox
$.browser.mozilla;
Reading the browser version
$.browser.version
You can also examine arbitrary User Agents
jQBrowser.uaMatch ();
Specifically detects Windows, Mac, Linux, iPad, iPhone, iPod, Android, Kindle, Blackberry, Chrome OS, and Windows Phone User Agents
$.browser.android $.browser.blackberry $.browser.cros $.browser.ipad $.browser.iphone $.browser.ipod $.browser.kindle $.browser.linux 1TP2ergebrowser.browser.browser.browser.browser.Mac2T. $.browser.playbook $.browser.silk $.browser.win $.browser ["windows phone"]
Example:
if ($.browser.mac && $.browser.desktop && $.browser.versionNumber <= 7) {$ ('. browsehappy'). fadeIn (); } if ($.browser.win && $.browser.desktop && $.browser.versionNumber <= 7) {alert ('Site not supported in safari windows obsolete version'); $ ('. Browsehappy'). FadeIn (); }
No Comment