jquery错误: Cannot read property ‘msie’ of undefined
背景
Web application, 引用了jquery 1.10.2和fancybox 1.3.4
现象
访问页面遭遇Cannot read property ‘msie’ of undefined的报错
原因
fancybox尝试使用$.browser, 但$.browser从jQuery1.9开始就正式废除,因此报错
解决办法
下载jquery-migrate-1.2.2,在引用jquery库之后引用jquery-migrate,错误解决
<script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
jquery错误: Cannot read property ‘msie’ of undefined的更多相关文章
- [转载][jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
参考 [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法 ---------------------------------------- ...
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法 --转
初用Yii的srbac模块.出现 Cannot read property ‘msie’ of undefined 错误.上网查询,找到如下的文章.使用文末的打补丁的方法,成功搞定.感谢. ===== ...
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property ‘msie’ of undefined.上jQuery网站上搜了一下,原因是$.browser这个a ...
- jquery升级到新版本报错[jQuery] Cannot read property ‘msie’ of undefined错误的解决方法(转)
最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property 'msie' of undefined.上jQuery网站上搜了一下,原因是$.browser这个a ...
- [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法
原文:[jQuery1.9]Cannot read property 'msie' of undefined错误的解决方法 $.browser在jQuery1.9里被删除了,所以项目的js代码里用到$ ...
- Cannot read property ‘msie’ of undefined错误原因以及解决方案
最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property ‘msie’ of undefined.上jQuery网站上搜了一下,$.browser这个api从 ...
- Uncaught TypeError: Cannot read property 'msie' of undefined
因为图方便,抄了别人写的一个jquerry插件,运行时“var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ...
- 获取判断IE版本 TypeError: Cannot read property 'msie' of undefined
注意:以下方法只适用于IE11 以下: TypeError: Cannot read property 'msie' of undefined jquery1.9去掉了 $.browser 所以报错 ...
- ExtJS错误解决 Cannot read property 'on' of undefined
背景 用ExtJS新写了一个功能,运行时控制台打印错误Cannot read property 'on' of undefined,出错代码位置是Ext.define.bindStoreListene ...
随机推荐
- "浅谈Android"第二篇:活动(Activity)
距离上一篇文章,过去有半个多月了,在此期间忙于工作,疏于整理和总结,特此写下这篇博文,来谈谈自己对Activity的理解.总所周知,Activity组件在Android中的重要性不言而喻,我们 ...
- UWP开发入门(十四)—— UserControl中Adaptive UI的小技巧
本篇我们通过绘制一个非常简单的UserControl控件,来分享一下对Adaptive UI的理解及一些图形绘制的技巧. 现在流行的APP都少不了精致的用户头像,首先假设我们需要绘制如下的图形作为默认 ...
- ListBox实现拖拽排序功能
1.拖拽需要实现的事件包括: PreviewMouseLeftButtonDown LBoxSort_OnDrop 具体实现如下: private void LBoxSort_OnPreviewMou ...
- 用Qt写软件系列四:定制个性化系统托盘菜单
导读 一款流行的软件,往往会在功能渐趋完善的时候,通过改善交互界面来提高用户体验.毕竟,就算再牛逼的产品,躲藏在糟糕的用户界面之后总会让用户心生不满.界面设计需综合考虑审美学.心理学.设计学等多因素, ...
- undefined reference to `omp_get_max_threads'
原因是缺少 libgomp/openmp 库的链接 配置和解决方法参考: http://www.code-by.org/viewtopic.php?f=54&t=163
- C#类的继承相关总结
1.子类继承父类,会拥有父类中所规范的所有成员,但是只能是使用其中的公共成员 2.实现了继承,可以做到代码的冗余,做到代码的重用 3.实现了继承,可以方便代码的扩展与修改 4,当子类拥有与父类相同签名 ...
- eclipse中改变默认的workspace的方法及说明
eclipse中改变默然的workspace的方法可以有: 1.在创建project的时候,手动选择使用新的workspace,如创建一个web project,在向导中的Location选项,取消使 ...
- 【循序渐进学Python】12.Python 正则表达式简介
正表达式就是一段匹配文本片段的模式,在Python 中 re 模块包含了对正则表达式(regular expression)的支持. 1. 正则表达式的基本概念 1. 通配符 点号( . )可以匹配换 ...
- jQuery获取Select选择的Text和 Value(转)用时比较方便寻找
---恢复内容开始--- jQuery获取Select选择的Text和Value:语法解释:1. $("#select_id").change(function(){//code. ...
- Spring 接口代理 类代理
1.Question Description : when you use @Transactional annotation and @RequiresPermissions annotation ...