kkreft / jquery-browser-plugin

A jQuery plugin for browser detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A jQuery plugin for browser detection. jQuery removed support for browser detection on 1.9.1 so it was abstracted into a jQuery plugin

Installation

Include script after the jQuery library:

<script src="/path/to/jquery.browser.js"></script>

Usage

Returns true if the current useragent is some version of Microsoft's Internet Explorer.

$.browser.msie;

Returns true if the current useragent is some version of a Webkit browser (Safari, Chrome or soon Opera).

$.browser.webkit;

Returns true if the current useragent is some version of Firefox.

$.browser.mozilla;

Reading the browser verion

$.browser.version

Things not included in the original jQuery $.browser implementation

Detect iPad, iPhone and Android useragents

$.browser.ipad
$.browser.iphone
$.browser.android

Development

Attributions

About

A jQuery plugin for browser detection