Uncaught TypeError: Object [object Object] has no method 'live' 报错
来源:互联网 发布:apache如何加载php 编辑:程序博客网 时间:2024/06/05 20:45
$( selector ).live( events, data, handler ); // jQuery 1.3+
$( document ).delegate( selector, events, data, handler ); // jQuery 1.4.3+
$( document ).on( events, selector, data, handler ); // jQuery 1.7+
原来 live 是老版 支持 的,新版换方法了。学学吧。
$(document).on("click", ".classname", function(){
});
$( "a.offsite" ).live( "click", function() {
alert( "Goodbye!" ); // jQuery 1.3+
});
$( document ).delegate( "a.offsite", "click", function() {
alert( "Goodbye!" ); // jQuery 1.4.3+
});
$( document ).on( "click", "a.offsite", function() {
alert( "Goodbye!" ); // jQuery 1.7+
});
参考:http://api.jquery.com/live/
测试网址:http://jsfiddle.net/6mBsB/
0 0
- Uncaught TypeError: Object [object Object] has no method 'live' 报错
- Uncaught TypeError: Object [object Object] has no method 'live'
- jquery: Uncaught TypeError: Object [object Object] has no method 'live'
- 安卓WebView报错:android uncaught typeerror object object object has no method
- Uncaught TypeError: Object [object Object] has no method 'xxx'
- Uncaught TypeError: Object [object Object] has no method 'highcharts'
- Android webview js 调用java方法报错"Uncaught TypeError: Object [object Object] has no method xx
- Uncaught TypeError: Object #<Object> has no method 'addEvents'
- Uncaught TypeError: Object #<Object> has no method 'addEvents'
- ztree “Uncaught TypeError: Object # has no method 'toLowerCase'”
- Uncaught TypeError: Object #<HTMLDivElement> has no method 'attr'
- Uncaught TypeError: Object #<Document> has no method 'load'
- Uncaught TypeError: Object #<HTMLCollection> has no method 'toLowerCase'问题
- jquery file upload报错 TypeError: Object [object Object] has no method 'progressbar'
- TypeError: Object #<Object> has no method 'createClient'
- jquery dialog异常 Uncaught TypeError: Object [object Object] has no method 'dialog'
- [Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
- sencha touch中出现JS错误Uncaught TypeError: Object [object Object] has no method 'getForm'
- 常用的人脸识别数据资源
- 耐心研究该魔方图,也许你会找到魔方的规律
- 正则表达式
- java谜题3:长整除
- android 4.4中的流媒体渲染过程
- Uncaught TypeError: Object [object Object] has no method 'live' 报错
- Java GUI编程(一)Fream 简单方法调用
- Android中设置中文粗体的方法
- pjsip协议栈中定时器的实现详解
- Oracle 重建索引的必要性
- 静态导入
- CGContext的基本认识
- 实战Linux Bluetooth编程
- android:editable和android:enabled的区别