jQuery > Ajax methods

.ajaxComplete() - Knowing ajax request is complete in jQuery

How to know when ajax request is complete in jQuery?

To know if the ajax request is complete, ajaxComplete() method can be used.

        $(document).ajaxComplete(function () {
            $("#divAjaxComplete").html("ajaxComplete: ajax request completed : ");

In the above code snippet, when ajax request is complete “ajaxComplete – ajax request complted :” is written inside “divAjaxComplete” element.

Note that this event executes after .ajaxSuccess() event. We can catch this event to show a final message or perform any activity.


Note that this event fires irrespective of ajax request completed successfully or it error out.

 Views: 6479 | Post Order: 115

Write for us

Hosting Recommendations