$ is not a function
来源:互联网 发布:计算机二级vb考试 编辑:程序博客网 时间:2024/05/01 03:14
今天做项目,报错$ is not a function,确认已经加载了jquery文件
问题原因:
加载了另外一个插件,也是使用$符号,所以使用jquery的时候,使用了jquery.noconflict,但是$不能用了.
解决方案:
使用jquery闭包,将jQuery作为参数传到闭包里面,然后就可以在闭包中使用$为jquery的,闭包外使用$为另外一个插件的。
jquery.noconflict();(function($){ $("#id").html();})(jQuery);
- $ is not a function
- $ is not a function
- is not a function
- $(...).niceScroll is not a function; $... is not a function
- object is not a function
- RVM is not a function
- $(...).scrollpic is not a function
- javascript *** is not a function
- $(...).live is not a function
- $(...).niceScroll is not a function
- $(...).live is not a function
- $(...).modal is not a function
- $(...).modal is not a function
- toFixed() is not a function
- $.handleError is not a function
- __webpack_require__(...) is not a function
- xxx is not a function
- $.ajaxFileUpload is not a function
- Meego下搭建QT环境
- 如何在NS-2 AODV协议中添加一种新的数据包类型[转载]
- 【小编分享:巧设CPU电源管理 Win8屏幕不死机】
- Felx 解析的问题
- 关于Extjs收费问题
- $ is not a function
- 【三个小办法电脑机密不泄露】
- mysqldump备份数据库与命令选项
- winform TextBox只能输入数字和小数点加小数点位置判断
- ArcGIS for SilverLight 线要素缓冲分析的问题
- 总结:基础程序设计
- STM32 I2C 难点
- Javascript 表单校验的三种方法
- 总结:程序设计基础