ajaxStart Example

Example from jquery forum: https://forum.jquery.com/topic/ajaxstart-is-not-working

HTML

<div class="trigger">Trigger</div>
<div class="result"></div>
<div class="log"></div>

JavaScript

$(document).ready(function() {

    $('.log').ajaxStart(function() {
        $(this).text('Triggered ajaxStart handler.');
    });

    $('.trigger').click(function() {
//        $('.result').load('ajax/test.html');
        $.ajax({
            url: 'http://jsfiddle.net/echo/jsonp/?callback=?',
            dataType: 'json',
            data: {
                projectNo: '106020'
            },

            error: function(response, error) {
                alert(error);
                alert(response);
                var r = $.parseJSON(response.responseText);
                alert("Message: " + r.Message);
                alert("StackTrace: " + r.StackTrace);
                alert("ExceptionType: " + r.ExceptionType);
            }
        });

    });



});