Uncaught TypeError: $(...).on is not a function
来源:互联网 发布:淘宝卖家寄灵位 编辑:程序博客网 时间:2024/05/22 02:11
今天写个页面,想给button绑定事件,就用jQuery的on方法,结果报错了Uncaught TypeError: $(...).on is not a function。
这很不科学!
查了一下,应该是jQuery版本的问题。因为老版本的jQuery中不支持on方法,可以用bind方法代替。
简单分析了一下,项目中的jQuery版本为什么会很老旧。
微博已经运行很多年了,所以为了兼容吧,不能轻易升级jQuery的版本。
以后再遇到类似的问题,就知道怎么解决了。
阅读全文
1 0
- Uncaught TypeError: $(...).on is not a function
- Uncaught TypeError: s.elem.on is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: string is not a function
- Uncaught TypeError: object is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: undefined is not a function
- Uncaught TypeError: object is not a function
- Uncaught TypeError: boolean is not a function
- Uncaught TypeError: $(...).appendChild is not a function
- Uncaught TypeError: sum is not a function
- Uncaught TypeError: search is not a function
- Uncaught TypeError: $(...).Validform is not a function
- Uncaught TypeError: $(...).customFileInput is not a function
- Uncaught TypeError: $(...).scrollTo is not a function
- layer.js:2 Uncaught TypeError: n.on is not a function(…)
- Uncaught TypeError: a.beginBulkUpdate is not a function
- javascript 错误 "Uncaught TypeError: string is not a function"
- 两数相除——不允许使用高级运算
- 我的游戏之路——服务器之NIO篇
- java excel构造以及解析
- cordova 及插件相关命令
- 常用总结
- Uncaught TypeError: $(...).on is not a function
- tmpfs 临时文件系统,是一种基于内存的文件系统
- 计蒜客 平分娃娃(多重背包问题二进制优化)
- C++ STL之string常见用法
- JavaWeb学习篇之----容器Response详解
- 40个Java多线程问题总结
- c++ cout cerr clog的区别
- Ubuntu安装Docker
- 算法训练 数的统计