Hmm.. Does it mean that this indicator only appears once per specified ajax request?
Rey Bango wrote: > Hi Dmitrii, > > I actually ran into this same issue recently and basically took the > route of unbinding the ajaxstart event after the Ajax call was done. > Here's my code: > > // This is the Ajax indicator > $('#throbberSearch') > .ajaxStart(function(){ > $("searchResultsDiv").hide(); > $(this).show(); > }) > .ajaxStop(function(){ > $(this).hide(); > $(this).unbind("ajaxStart"); > }); > > This effectively stopped the AjaxStart from kicking off via every Ajax > call and allowed me to specify different AjaxStart() events for > different Ajax calls. > > I ran this by John Resig to make sure I wasn't going off in the wrong > direction and he said that the method was just fine. :o) > > It always feels good to get validation from the maker of the library. ;o) > > Rey... > > > > > Dmitrii 'Mamut' Dimandt wrote: > >> Ok. I'm at loss here. >> >> $.ajaxStart() is invoked for every ajax call that's made on the page. >> >> However, for one ajax call I need to display a "loading..." in one >> place, for another ajax call - a "loading..." in another place and for >> yet a third ajax call a "loading" in a third place. >> >> How can I do this in jQuery? Preferably, in one line (true to jQuery >> spirit :)) ). >> >> _______________________________________________ >> jQuery mailing list >> discuss@jquery.com >> http://jquery.com/discuss/ >> >> > >
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/