获取此错误:
Uncaught TypeError: Object [object Object] has no method 'live'
从这段JavaScript和jQuery代码中:
init: function(options) {
var form = this;
if (!form.data('jqv') || form.data('jqv') == null ) {
options = methods._saveOptions(form, options);
// bind all formError elements to close on click
$(".formError").live("click", function() {
//Getting error here:
//Uncaught TypeError: Object [object Object] has no method 'live'
});
}
return this;
};
为什么缺少live
方法?
发布于 2013-04-25 22:57:04
根据the documentation的说法,.live()
从1.7开始就被弃用了,并在1.9中被删除。
你要么不得不降级jQuery,要么使用更新版本的验证插件,如果有的话。
https://stackoverflow.com/questions/16218120
复制相似问题