title: How to get Jquery Ajax Readystates
body: <p>how can i know the readystates of an ajax request through jquery ?
  In general, without using jquery, we will send an ajax request like this:</p>
  
  <pre><code>http.open("POST", url, true);
  
  http.onreadystatechange = function() { 
      if(http.readyState == 4 &amp;&amp; http.status == 200) {
          // do something
      }
  }
  </code></pre>
  
  <p>So i can easily track the readystate value from 1 to 4 using the above code, and perform necessary action like showing a loading icon when readystate is 1.</p>
  
  <p>But through a jquery ajax call, how can i track the readystate values ?</p>
  
  <p>I am making an ajax call through jquery like this:</p>
  
  <pre><code>$.post('ajax/test.html', function(data) {
    $('.result').html(data);
  });
  </code></pre>