ajaxstart not working in chrome 1

ajaxstart not working in chrome

$(document).on({
    ajaxStart: function() {
        $('#spinner').show();
    },
    ajaxSuccess: function() {
        $('#spinner').hide();
    }
});

Here is what the above code is Doing:
1. When the document is ready, we attach a click event handler to the button.
2. When the button is clicked, we make an AJAX request to the server.
3. When the AJAX request is sent, we show the spinner.
4. When the AJAX request is successful, we hide the spinner.

Similar Posts