Double ajax functions?
<p>I saw in jQeury the code : </p>

<pre><code>var jqxhr = $.ajax( "example.php" )
    .done(function() { alert("success"); })
    .fail(function() { alert("error"); })
    .always(function() { alert("complete"); });
</code></pre>

<p>but each ajax Call has also a <strong>callback</strong> Functions  e.g. :</p>

<pre><code>  jQuery.ajax(
 {
   ...
 beforeSend: function( xhr ) 
  {

  },
 success: function (data, textStatus, jqXHR)
  {

  }, 
 error: function(jqXHR, error_textStatus, errorThrown)
  {

  }
   ,
  complete: function (jqXHR, complete_textStatus)
  {
   }

 });
</code></pre>

<p><strong>so What is the difference ?</strong></p>
