我正在使用JQuery UI自动完成功能。在IE中,在所有其他浏览器中都可以正常工作。它在jquery.ui.js给我一个无效的调用对象错误(735,2)。
这是引发错误的JQuery代码...
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
var instance = this;
*return setTimeout( handlerProxy, delay || 0 );*
},
老实说,我不知道发生了什么,因为它可以在其他浏览器上使用。
var input = $('input', ph);
input.autocomplete({
create: function () {
$(this).data('ui-autocomplete')._renderItem = function (ul, item) {
return $("<li></li>").append(myself._createLabelTag(item.label)).appendTo(ul);
};
},
source : function(request, response) {
var term = request.term.toUpperCase();
var matches = $.map(this.valuesArray, function(tag) {
if (myself._createLabelTag(tag.label).text().toUpperCase().indexOf(term) >= 0) {
return tag;
}
});
response(matches);
}.bind(this),
select : function(event, ui) {
$('#' + this.htmlObject + '-input').val(ui.item.value);
myself.dashboard.processChange(this.name);
}.bind(this)
});
由于无效的调用对象错误,未调用源事件,因此未呈现自动完成选项。