admin管理员组文章数量:1415467
I wanted to optimize my page loads recently so I switched from regular javascript files to ones that are minimized. They all work fine except for this one jquery.ui files. When I switched my ui file to one that's minimized, I get an error in chrome's javascript console that reads:
Uncaught TypeError: Cannot read property 'safari' of undefined
I'm not sure why I'm getting this error because before I switched from the regualar jquery.ui to the minimized one, it was working just fine.
Thanks,
Lance
I wanted to optimize my page loads recently so I switched from regular javascript files to ones that are minimized. They all work fine except for this one jquery.ui files. When I switched my ui file to one that's minimized, I get an error in chrome's javascript console that reads:
Uncaught TypeError: Cannot read property 'safari' of undefined
I'm not sure why I'm getting this error because before I switched from the regualar jquery.ui to the minimized one, it was working just fine.
Thanks,
Lance
Share Improve this question edited Apr 25, 2016 at 12:40 Aldracor 2,1811 gold badge20 silver badges28 bronze badges asked Feb 18, 2013 at 12:53 LanceLance 4,83016 gold badges55 silver badges90 bronze badges 2- 1 Are you using the correct version for you jQuery version? Which one are you using? – Felix Kling Commented Feb 18, 2013 at 12:56
- @FelixKling 1.9.1, while jQuery UI is 1.8.9. – VisioN Commented Feb 18, 2013 at 13:04
3 Answers
Reset to default 3The answer is that in jQuery 1.9 property $.browser
was removed.
You should update your minimized jQuery UI to be patible with new version of jQuery.
REF: jQuery.browser: Javascript Uncaught TypeError
You're using jQuery 1.9.1, which no longer includes the jQuery.browser
property. You'll either need to switch back to an older version of jQuery (< 1.9), or use the migrate plugin.
jQuery UI is referencing $.browser
, which is undefined
. Your minimized UI file is clearly for use with an older version of jQuery .
版权声明:本文标题:jquery - Javascript console: Uncaught TypeError: Cannot read property 'safari' of undefined - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745158807a2645336.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论