Just wondering if anyone could give me any pointers on what the best way to add loading feedback to a post function for my autocomplete would be. right now it can take some time to bring back results(slow server) so i just want to show some kind of loader graphic as user feedback some request is happening. What would be the best way to structure this in my current code?
code:
function lookup(inputString) {
if (inputString.length == 0) {
// Hide the suggestion box.
$('#suggestions').fadeOut('fast');
$('#hover-Box').fadeOut('fast');
//get the first element title and display in hover box
while (showitem == true) {
//show item if cond is true
var item = $('.titleid_search_hidden:first').text();
detail(item);
showitem = false; //subsequent req not allowed
}
Bookmarks