Expanding on the jQuery post function
<p>I have the following function in my code:</p>

<pre><code>        $.post($form.attr('action'), $form.serializeArray())
            .done(function (json) {
            }
</code></pre>

<p>From what I understand from the jQuery docs this is a shortcut. What I would like to do is to change so that it allows me to have some function that executes on success and some function that executes on error. Is this possible to do? All I see is a .done?</p>

<pre><code>$.ajax({
   url: target,
   dataType: 'json',
   type: 'POST',
   data: data,
   success: function(data, textStatus, XMLHttpRequest) { },
   error: function(XMLHttpRequest, textStatus, errorThrown) { }
</code></pre>
