JQuery

Delayed object-deferred.done(doneCallbacks[,doneCallbacks])

Delayed object-deferred.done(doneCallbacks[,doneCallbacks]), someone asked me to explain?

Overview

Call a function or array function when the delay is successful.

This parameter can be a function or an array of functions. When the delay is successful, doneCallbacks is called. The callback execution is in the order they were added. Once deferred.done() returns a lingering object, other methods of tempering the object can also be linked here, including adding the .done() method. When the delay is resolved, the doneCallbacks execution is called with the parameters supplied to the resolve or resolveWith methods in the order they were added. For more information, see Deferred object .

parameter

doneCallbacksFunction/ArrayV1.5

a function or array function, called when the delay is successful

doneCallbacksFunction/ArrayV1.5

Additional optional function or array function, called when the delay is successful

Example

description:

Once the jQuery.get method returns a jqXHR object from the deferred object, we can attach a successful callback using the .done method.

jQuery code:
$.get("test.php").done(function () {
        alert("$.get succeeded");
    });

Post your comments / questions