jQuery documentation on jQuery.post( )
// Assign handlers immediately after making the request,
// and remember the jqxhr object fo
Both .done() and .success() are callback functions and they essentially function the same way.
Here's the documentation. The difference is that .success() is deprecated as of jQuery 1.8. You should use .done() instead.
In case you don't want to click the link:
Deprecation Notice
The
jqXHR.success(),jqXHR.error(), andjqXHR.complete()callback methods introduced in jQuery 1.5 are deprecated as of jQuery 1.8. To prepare your code for their eventual removal, usejqXHR.done(),jqXHR.fail(), andjqXHR.always()instead.