I have a site which has jquery included in the header. the application makes heavy use of jquery. now, that site uses ajax and shows up different message boxes when the user does something (it's a third party product used). I want to modify these boxes, but I need a piece of code to take action as soon as the DOM gets manipulated by ajax or jquery, or as soon as jquery receives any message with ajax, and then I must intercept that message, manipulate it and pass it on. I have no clue about jquery, but I do have about javascript. Does jquery offer something for this situation?
If you have control of the JavaScript you can just figure out where the popup boxes are in the code and replace them with what you need.
You can add a global AJAX handler for various AJAX events. You might want to see if the ajaxSuccess handler allows you to do what you want.
tvanfosson is correct, but i can elaborate further. There are 6 universal Ajax events that are triggered with ANY ajax call through jQuery. They are very cool, and you can make a universal include script that will handle all event on all pages the same way.
Complete List - Look under "Ajax Events"
The big ones are:
AjaxStart - Triggered anytime any ajax call is made. Good for showing an animated gif in a floating dialog to show processing is happening.
AjaxStop - Triggered when all ajax calls have stopped. Good for hiding said animated processing gif
AjaxError - triggered anytime an ajax error occurs. Hint: Display the message in a floating dialog
AjaxSuccess - not really recommended as a universal event. Specify unique events for each actual ajax instead.
Hopes this helps!