title: How to call jquery ajaxStart + ajaxComplete
body: <p>I have a load function and would like for the code to write some html into a div while it loads, and when it completes, to display the page. I saw some little write-ups on the <code>ajaxStart</code> and <code>ajaxComplete</code> events, however I am not sure how to implement them.</p>
  <p>Here is the jQuery I am thinking of using, however not sure how to implement within the code I have currently…</p>
  <pre class="lang-js prettyprint-override"><code>$(document).ajaxStart(function(){ 
      $('#content').html(&quot;Loading Content...&quot;);
  });
  </code></pre>
  <p>Here is the current jQuery I am using:</p>
  <pre class="lang-js prettyprint-override"><code>//Load content
  $(&quot;.load&quot;).click(function(){
      $(&quot;#content&quot;).empty();           
      loadName = $(this).attr(&quot;id&quot;);
      $(&quot;#content&quot;).load(&quot;/content/&quot; + loadName + &quot;.php&quot;);
  });
  </code></pre>