Deprecation of success Parameter in jQuery.ajax?

Today I have heard that the success-Parameter in the jQuery.ajax function is deprecated. Have I understood that correctly? Or am i missunderstanding something?

For Example this would not work in the future:

 $.ajax({

            url: 'ax_comment.php',              
            type: 'POST',
            data: 'mode=view&note_id='+noteid+'&open='+open+'&hash='+hash,
            success: function(a) {
            ...

            }   

    });

And i have to use this?

$.ajax({

            url: 'ax_comment.php',

            type: 'POST',
            data: 'mode=view&note_id='+noteid+'&open='+open+'&hash='+hash,
            success: function(a) {
            ...

            }   

    }).done(function(a){.....};

Source: http://api.jquery.com/jQuery.ajax/ (Scroll down to Deprecation Notice)


Solution 1:

There is a difference between, the Ajax success callback method:

$.ajax({}).success(function(){...});

and the Ajax success local callback event (i.e., the Ajax parameter and property):

$.ajax({
    success: function(){...}
});

The success callback method (first example) is being deprecated. However, the success local event (second example) is not.

Local events are Ajax properties (i.e., parameters). The jQuery docs further explain that the local event is a callback that you can subscribe to within the Ajax request object.

So in future, you may do either:

$.ajax({}).done(function(){...});

or

$.ajax({
    success: function(){...}
});