当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - 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.

I get this error when I try to debug in IE11 and 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. 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.

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

$.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. Get the latest version for your version of jquery and it should work. 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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: