1

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

1
  • Are you doing all your AJAX calls with the same API method or is it a mixture of jQuery.get, jQuery.post, jQuery.getJSON, etc.? Commented Feb 19, 2010 at 10:54

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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

1 Comment

sorry no good wanted a global catchall (see answer from Bernhard Hofmann)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.