Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

[![Build Status](https://travis-ci.org/gabceb/jquery-browser-plugin.svg?branch=master)](https://travis-ci.org/gabceb/jquery-browser-plugin)

A jQuery plugin for browser detection. jQuery removed support for browser detection on 1.9.1 so it was abstracted into a jQuery plugin
A jQuery plugin for browser detection. jQuery v1.9.1 dropped support for browser detection, and this project aims to keep the detection up-to-date.

## Installation

Include script *after* the jQuery library:
```html
<script src="/path/to/jquery.browser.js"></script>
```

<script src="/path/to/jquery.browser.js"></script>
Alternatively, you can use the plugin without jQuery by substituting `$.browser` for the global `jQBrowser` object.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shoot, I just noticed I got this backward. -_-


## Usage

Returns true if the current useragent is some version of Microsoft's Internet Explorer. Supports all IE versions including IE 12.
Returns true if the current useragent is some version of Microsoft's Internet Explorer. Supports all IE versions including IE 11.

$.browser.msie;

Expand All @@ -24,10 +27,14 @@ Returns true if the current useragent is some version of Firefox

$.browser.mozilla;

Reading the browser verion
Reading the browser version

$.browser.version

You can also examine arbitrary useragents

jQBrowser.uaMatch();

## Things not included in the original jQuery $.browser implementation

- Detect specifically Windows, Mac, Linux, iPad, iPhone, iPod, Android, Kindle, BlackBerry, Chrome OS, and Windows Phone useragents
Expand Down Expand Up @@ -78,7 +85,7 @@ Alternatively, you can detect for generic classifications such as desktop or mob
$.browser.versionNumber // Returns 32 as a number
```

- Support for new useragent on IE 11 and IE 12
- Support for new useragent on IE 11
- Support for WebKit based Opera browsers
- Added testing using PhantomJS and different browser user agents

Expand Down