jQuery.browserProperty
Examples
Display browser information:
$(function () {
$.each( $.browser, function( i, val ) {
$( "<div>" + i + " : <span>" + val + "</span>" )
.appendTo( document.body );
});
})
$.each( $.browser, function( i, val ) {
$( "<div>" + i + " : <span>" + val + "</span>" )
.appendTo( document.body );
});
})
Try it Yourself »
Definition and Usage
$.browser PropertyRemoved in jQuery 1.9.Used to return information about the browser currently used by the user.
It is not recommended to use this property to detect the browser, because it determines browser information based on the navigator.userAgent property, so its detection is not necessarily accurate.Syntax
$.browser
| Parameters | Description |
|---|---|
| webkit | Boolean type Indicates whether it is a WebKit-based browser. |
| safari | Boolean type Indicates whether it is an Apple Safari browser. |
| opera | Boolean type Indicates whether it is an Opera browser. |
| msie | Boolean type Indicates whether it is a Microsoft IE browser. |
| mozilla | Boolean type Indicates whether it is a Mozilla Firefox browser. |
| chrome | Boolean type Indicates whether it is a Google Chrome browser. |
| version | String type The version number of the current browser, e.g.: "6.0", "7.0". |
More Examples
Using the IE browser
Indicates that the currently used browser is IE.
Using a WebKit-based browser
Indicates that the browser currently used is a WebKit-based browser.
Browser version number
Returns the version number of the current browser.
IE browser version number
Returns the version number of the IE browser.
Other Extensions
jQuery Miscellaneous Methods