As jQuery.browser has been removed since 1.9 I am getting a lot of trouble because so many plugins did not get updated and still use that function despite of its absence in current jQuery releases. Is there any recommended way to modify existing plugins or any other advice?
-
1See [Is jQuery $.browser Deprecated?](http://stackoverflow.com/questions/9638247/is-jquery-browser-deprecated) – jantimon Mar 25 '13 at 12:54
-
related: http://stackoverflow.com/questions/15540835/jquery-browser-script-or-shim-for-backwards-compatibility-of-plugins-with-1-9-1?rq=1 – Thilo Mar 25 '13 at 12:55
-
1I would suggest using this http://jquery.com/upgrade-guide/1.9/#jquery-migrate-plugin until you can migrate over to using `$.support` – Jeff Shaver Mar 25 '13 at 12:55
2 Answers
The
jQuery.browser()
method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr
jQuery Migrate 1.1.1 Released:
Using the
jQuery Migrate
plugin is easy, just include it immediately after the script tag for jQuery, for example.<script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.1.1.js"></script>
-
1If you're going to quote text verbatim from somewhere else, please give a reference to it. – Spudley Mar 25 '13 at 13:00
http://jquery.com/upgrade-guide/1.9/#jquery-browser-removed
jQuery.browser() removed
The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.
So it should be available here:
http://blog.jquery.com/2013/01/31/jquery-migrate-1-1-0-released/

- 29,707
- 9
- 41
- 58