title: Checking Jquery ajax load success
body: <p>I've been using <a href="http://docs.jquery.com/Ajax/load" rel="nofollow noreferrer">this</a> to load another page, and just using their example :</p>
  
  <pre><code>$("#links").load("/Main_Page #jq-p-Getting-Started li");
  </code></pre>
  
  <p>However I want to run a function when the load is successful, and a different one if it fails, unfortunately the description on the callback says:</p>
  
  <blockquote>
    <p>The function called when the ajax request is complete (not necessarily success).</p>
  </blockquote>
  
  <p>How do I make sure the load was successful?</p>
  
  <p>Thanks.</p>