title: ajax request.done make the script broken?
body: <p>I'm trying to send an ajax request using jquery. From the tutorial, I try this simple script:</p>
  
  <pre><code>function show(){
      $("#mesg").html("begin");
  
      var request = $.ajax({
          type: "POST",
          url: "some url",
          data: '{"user_name": "NAME"}',
          contentType: "application/json; charset=utf-8",
          dataType: "json"
      });
  
      $("#mesg").html("waiting");
  
      request.done(function(){
          $("#mesg").html("done sending");
      });
  
      $("#mesg").html("still waiting");
  
      request.fail(function(){});
  
      $("#mesg").html("end of function");
  }
  </code></pre>
  
  <p>So the request is supposed to fail and the content of #mesg should be "end of function". However, what I got was "waiting," which is before request.done(). So is there a syntax error here?</p>