Is there any kind of jQuery.browser fallback?

谁说我不能喝 提交于 2019-12-11 02:37:00

问题


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?


回答1:


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

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>



回答2:


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/



来源:https://stackoverflow.com/questions/15615437/is-there-any-kind-of-jquery-browser-fallback

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!