You could always show the loading animation just before the ajax call and
hide it within the calls callback function:
$("#loading1").show();
$.get('handle.php',input,function(){
// Do stuff
$("#loading1").hide();
});
Not as pretty as $.ajaxStart(), but this is the only way I see to handle
multiple 'loading' images. Note, if there is an error, only ajaxError will
catch it, so you may want to make some kind of global array that contains a
list of active ajax calls, so you know which one failed and you can handle
it accordingly.
- jake
On 2/26/07, Dmitrii 'Mamut' Dimandt <[EMAIL PROTECTED]> 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
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/