Tuesday, October 16, 2012

jquery ajaxStop vs ajaxComplete


The events ajaxStop fires only when all the ajax requests in the page complete their execution, while the ajaxComplete get fired for every individual Ajax request.

The ajaxStop event handler does not provide any parameters since it gets fired only after all the Ajax requests in the page get completed, whereas the ajaxComplete event handler provides the request object and a set of settings as parameters which can be used to identify the request for which the ajaxComplete event got fired.

The syntax for the ajaxComplete event handler is as follows.

ajaxComplete(function(objEvent, objXHR, objSettings))

objEvent        – The event Object
objXHR          - The XMLHttpRequest Object
objSettings    - Options used to make the Ajax Request


The syntax for the ajaxStop event handler is as follows.

ajaxStop(function())


Related Post


Search Flipkart Products:
Flipkart.com

No comments: