English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Methods

Specify a function to be executed after all AJAX requests are completed

jQuery ajaxStop() Method

The ajaxStop() method attaches a function to be executed when all Ajax requests are completed. This is an AjaxEvent.

Every time an Ajax request is completed, jQuery checks if there are any other pending Ajax requests. If not, jQuery triggers the ajaxStop event. At this point, all handlers registered with the ajaxStop() method will be executed.Note: 1From jQuery8.

From version X, this method should only be attached to the document.

Syntax:

$(document).ajaxStop(function())

Example

Example
  $(document).ajaxStop(function()
alert("All AJAX requests completed");
});/Test and See‹

Parameter ValuesParameters
Descriptionfunction()

Specify a function to be executed after all AJAX requests are completed