[英]Unable to get property 'apply' of undefined or null reference - IE11 and Chrome
I am new to Javascript and jQuery and having trouble in fixing this error. 我是Java和jQuery的新手, 无法解决此错误。
I get this error when I try to debug in IE11 and chrome. 当我尝试在IE11和chrome中调试时收到此错误。 Initially I got 最初我得到了
Unable to get property 'call' of undefined or null reference 无法获取未定义或空引用的属性“调用”
in jquery.validate.min.js for event.handle.call
and I did some research and fixed it by changing to event.dispatch.call
. 在jquery.validate.min.js中找到event.handle.call
,我做了一些研究并通过更改为event.dispatch.call
进行了event.dispatch.call
。 As soon as I fixed that I am getting this error and couldn't find any good resolution. 一旦我解决了这个错误,便找不到任何好的解决方法。
I am using jQuery 1.10.* and want to fix this error when debugging IE11 and Chrome . 我正在使用jQuery 1.10。*,并且想在调试IE11和Chrome时修复此错误。
Any suggestions would be really useful. 任何建议将非常有用。 Point me to any useful resource or a possible fix. 向我指出任何有用的资源或可能的修复方法。
EDIT: 编辑:
I am getting this error in function handlerProxy in jQuery-ui-1.10.3.js 我在jQuery-ui-1.10.3.js的function handlerProxy中遇到此错误
$.each( handlers, function( event, handler ) {
function handlerProxy() {
// allow widgets to customize the disabled handling
// - disabled as an array instead of boolean
// - disabled class as method for disabling individual parts
if ( !suppressDisabledCheck &&
( instance.options.disabled === true ||
$( this ).hasClass( "ui-state-disabled" ) ) ) {
return;
}
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
}
Chances are you were using an outdated version of jquery.validate. 您可能使用了过时的jquery.validate版本。 Get the latest version for your version of jquery and it should work. 获取适用于您的jquery版本的最新版本,它应该可以工作。 That's the way that I fixed this problem. 这就是我解决此问题的方法。 I was using jquery 1.11 and jquery.validate 1.10 and update validate to 1.11 and it worked fine. 我正在使用jquery 1.11和jquery.validate 1.10并将validate更新到1.11,它工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.