是否有jQuery.browser后备类型? [英] Is there any kind of jQuery.browser fallback?

查看:98
本文介绍了是否有jQuery.browser后备类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于jQuery.browser自1.9起已被删除,因此我遇到了很多麻烦,因为许多插件没有得到更新,尽管当前的jQuery版本中没有该插件,但仍然使用该函数.是否有建议的方法来修改现有插件或任何其他建议?

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?

推荐答案

jQuery .browser()已删除:

jQuery.browser()方法自jQuery 1.3起已被弃用,并已从1.9中删除.如果需要,它可以作为 jQuery Migrate插件的一部分使用.我们建议对诸如 Modernizr

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已发布:

使用jQuery Migrate插件很容易,例如,只需将其包括在jQuery的脚本标签之后即可.

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>

这篇关于是否有jQuery.browser后备类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆