tags:

views:

42

answers:

2

Hi

I have a complex site with lots of jquery loads in various places and in different files. I want to have a single method which renders a loading popup when any of the ajax loads run, without (hopefully) modifying them all.

Anyone know a way to 'catch' any ajax request start, and also the request end?

Thanks

A: 

See here. The complete and beforeSend events to achieve the behaviour you are looking for.

Obalix
sorry no good wanted a global catchall (see answer from Bernhard Hofmann)
Mark Milford
+1  A: 

I believe what you want to do is register for the ajaxStart and ajaxStop events. These will fire for any jQuery ajax events.

Bernhard Hofmann
Thanks thats what I needed, as to low acceptance rate a lot are not quite what I needed, perhaps im just bad at asking questions
Mark Milford