title: jQuery.ajax: TypeError: Property 'xhr' of object #<Object> is not a function
body: <p>I have a jquery.ajax object in which I want to substitute xhr. However executing the following code gives me an error:</p>
  
  <pre><code>TypeError: Property 'xhr' of object #&lt;Object&gt; is not a function
  </code></pre>
  
  <p>The relevant code is:</p>
  
  <pre><code>    var req = jQuery.ajaxSettings.xhr();
      req.upload.addEventListener('progress', calendar.check_progress, false);
  
      $.ajax({
          url: script_root + '_save_file/'+id+'/'+timestamp,
          type: 'POST',
          processData: false,
          contentType: false,
          data: fd,
          xhr: req,
          success: function(data){
              do_something();
          },
          error: function(data){
              console.log(data);
              do_something_else();
          }
      });
  </code></pre>