I'm using jQuery UI Autocomplete search and open events. But the open event is only called when the request is successful and there are elements. There does not seem to be an event when the response is successful but empty.
I display and hide a spinner logo when triggering the request, like this :
search: function() {
$('.spinner').show();
},
open: function() {
$('.spinner').hide();
}
This works well when there are elements in the server response but if the server response is empty the spinner stays forever...
On ui-autocomplete demo page there is one example with spinner. Jquery-ui adds ui-autocomplete-loading class while loading request, and this class adds background-image spinner.gif to input. It is acceptable solution for me.
Leave a comment on lllukom's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic