javascript - 是否有任何类型的 jQuery.browser 后备?

标签 javascript jquery deprecated

由于 jQuery.browser 自 1.9 以来已被删除,因此我遇到了很多麻烦,因为许多插件没有更新并且仍然使用该功能,尽管当前的 jQuery 版本中没有该功能。有没有推荐的方法来修改现有插件或任何其他建议?

最佳答案

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>

关于javascript - 是否有任何类型的 jQuery.browser 后备?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15615437/

相关文章:

javascript - 隐藏提取错误

jQuery背景过渡效果

ios - 广告横幅内容大小会使设备崩溃?

javascript - 是否可以在 ipad 上使用 iscroll 选择文本?

javascript - Dojo 图表问题 : Bar Chart (ClusteredColumns) Using Array?

javascript - 如何使用 '&' 或 '?' 作为第一个字符进行正则表达式调用

javascript - Jquery ajax模态表单回发到父表单

javascript - jquery 设置的复选框和数字字段出现一瞬间,然后突然消失

ruby - 为什么在 RSpec 中弃用了负面的特定异常期望?

c++ - 为什么不推荐使用 native Visual C++ 中的事件处理?