tags:

views:

241

answers:

1

I've been searching all over the place and just don't see anyone doing it - Is it possible to have some kind of spinner/loader with a jQuery UI Autocomplete? (1.8) while data is being fetched?

+1  A: 

You should be able to put a spinner image next to the field with the autocomplete and hide it initially. Then use the callback functions to hide/show it.

Then use the search option to show the spinner and open to hide it:

$( ".selector" ).autocomplete({
   search: function(event, ui) { 
       $('.spinner').show();
   },
   open: function(event, ui) {
       $('.spinner').hide();
   }
});
woolyninja
and as a side note - a great place for spinners = http://www.ajaxload.info/
woolyninja