未捕获的TypeError:无法读取未定义的属性'msie' - jQuery工具 [英] Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

查看:109
本文介绍了未捕获的TypeError:无法读取未定义的属性'msie' - jQuery工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Chrome开发者控制台中收到以下错误:

I am getting the following error in Chrome dev console:

Uncaught TypeError: Cannot read property 'msie' of undefined

我的理解是因为 .browser 现在已经在jQuery中弃用了,但我使用的是最新版本的jQuery工具,它仍然给出错误,我检查了 js 文件,它就在那里。

My understanding is that it is because .browser is now deprecated in jQuery however I am using the latest version of jQuery tools and it is still giving the error, I checked in the js file and it is there.

我怎样才能解决这个错误?

How can I get around this so it does not give the error?

推荐答案

从jQuery 1.9开始, $。browser 方法已被删除。

The $.browser method has been removed as of jQuery 1.9.


jQuery.browser()已删除

自jQuery 1.3以来,已弃用 jQuery.browser()方法并在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.

- < a href =http://jquery.com/upgrade-guide/1.9/> jQuery Core 1.9升级指南。

如升级指南中所述,您可以尝试使用 jQuery Migrate插件来恢复此功能并让jQuery Tools工作。

As stated in the Upgrade Guide you can try using the jQuery Migrate plugin to restore this functionality and let jQuery Tools work.

这篇关于未捕获的TypeError:无法读取未定义的属性'msie' - jQuery工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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