You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entries/jQuery.browser.xml
+9-35Lines changed: 9 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
<signature>
6
6
<added>1.0</added>
7
7
</signature>
8
-
<desc>Contains flags for the useragent, read from navigator.userAgent. <strong>We recommend against using this property; please try to use feature detection instead (see jQuery.support). jQuery.browser may be moved to a plugin in a future release of jQuery.</strong> </desc>
8
+
<desc>Contains flags for the useragent, read from navigator.userAgent. <strong>This property was removed in jQuery 1.9</strong> and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.</desc>
9
9
<longdesc>
10
10
<p>The <code>$.browser</code> property provides information about the web browser that is accessing the page, as reported by the browser itself. It contains flags for each of the four most prevalent browser classes (Internet Explorer, Mozilla, Webkit, and Opera) as well as version information.</p>
<desc>Returns true if the current useragent is some version of Microsoft's Internet Explorer.</desc>
32
+
<desc>Return true if the current useragent is some version of Microsoft's Internet Explorer. <strong>Will not work in jQuery 1.9 or later</strong> unless the <ahref="https://github.com/jquery/jquery-migrate/#readme">jQuery Migrate</a> plugin is included.</desc>
33
33
<code><![CDATA[
34
34
$.browser.msie;
35
35
]]></code>
36
36
</example>
37
37
<example>
38
-
<desc>Alerts "this is WebKit!" only for WebKit browsers</desc>
38
+
<desc>Alert "this is WebKit!" only for WebKit browsers. <strong>Will not work in jQuery 1.9 or later</strong> unless the <ahref="https://github.com/jquery/jquery-migrate/#readme">jQuery Migrate</a> plugin is included.</desc>
39
39
<code><![CDATA[
40
40
if ($.browser.webkit) {
41
41
alert( "this is webkit!" );
42
42
}
43
-
]]></code>
44
-
</example>
45
-
<example>
46
-
<desc>Alerts "Do stuff for Firefox 3" only for Firefox 3 browsers.</desc>
47
-
<code><![CDATA[
48
-
var ua = $.browser;
49
-
if ( ua.mozilla && ua.version.slice(0,3) == "1.9" ) {
50
-
alert( "Do stuff for firefox 3" );
51
-
}
52
-
]]></code>
53
-
</example>
54
-
<example>
55
-
<desc>Set a CSS property that's specific to a particular browser.</desc>
<desc>The version number of the rendering engine for the user's browser.</desc>
55
+
<desc>The version number of the rendering engine for the user's browser. <strong>This property was removed in jQuery 1.9</strong> and is available only through the jQuery.migrate plugin.</desc>
<p>Note that IE8 claims to be 7 in Compatibility View.</p>
84
65
</longdesc>
85
66
<example>
86
-
<desc>Returns the version number of the rendering engine used by the user's current browser. For example, FireFox 4 returns 2.0 (the version of the Gecko rendering engine it utilizes).</desc>
67
+
<desc>Return the version number of the rendering engine used by the user's current browser. For example, FireFox 4 returns 2.0 (the version of the Gecko rendering engine it utilizes). <strong>Will not work in jQuery 1.9 or later</strong> unless the <ahref="https://github.com/jquery/jquery-migrate/#readme">jQuery Migrate</a> plugin is included.</desc>
87
68
<code><![CDATA[
88
-
$("p").html( "The version number of the rendering engine your browser uses is: <span>" +
69
+
$("p").html( "The version # of the browser's rendering engine is: <span>" +
89
70
$.browser.version + "</span>" );
90
71
]]></code>
91
72
</example>
92
73
<example>
93
-
<desc>Alerts the version of IE's rendering engine that is being used:</desc>
74
+
<desc>Alert the version of IE's rendering engine that is being used. <strong>Will not work in jQuery 1.9 or later</strong> unless the <ahref="https://github.com/jquery/jquery-migrate/#readme">jQuery Migrate</a> plugin is included.</desc>
94
75
<code><![CDATA[
95
76
if ( $.browser.msie ) {
96
77
alert( $.browser.version );
97
78
}
98
-
]]></code>
99
-
</example>
100
-
<example>
101
-
<desc>Often you only care about the "major number," the whole number, which you can get by using JavaScript's built-in <code>parseInt()</code> function:</desc>
0 commit comments