views:

55

answers:

1

I'd like to apply this css to the search box while it is fetching the XML file. Currently it takes ~3 seconds to load this file.

I see in the autocomplete.js file these two functions:

    _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" );
},

I'm just not sure how and where to trigger that in my code.

Thanks

A: 
$("#name").addClass( "ui-autocomplete-loading" );

did it and .removeclass removes it

specked