listen for AJAX events on the document