【发布时间】:2011-04-20 01:46:23
【问题描述】:
我想在它获取 XML 文件时将此 CSS 应用到搜索框。目前加载该文件大约需要 3 秒。
我在 autocomplete.js 文件中看到了这两个函数:
_search: function( value ) {
this.term = this.element
.addClass( "ui-autocomplete-loading" )
// always save the actual value, not the one passed as an argument
.val();
this.source( { term: value }, this.response );
},
_response: function( content ) {
if ( content.length ) {
content = this._normalize( content );
this._suggest( content );
this._trigger( "open" );
} else {
this.close();
}
this.element.removeClass( "ui-autocomplete-loading" );
},
我只是不确定在我的代码中如何以及在何处触发它。
谢谢
【问题讨论】:
标签: jquery css jquery-ui autocomplete