How do I get a simple jQuery code to replace my current Javascript
<p>Goal : When click a link on my navigation will show spinning image until script fully loaded.</p>

<pre><code>function ahah(url, target) {
  document.getElementById(target).innerHTML = '&lt;img src="loading.gif" /&gt;';
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (req != undefined) {
    req.onreadystatechange = function() {ahahDone(url, target);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function ahahDone(url, target) {
  if (req.readyState == 4) { // only if req is "loaded"
    if (req.status == 200) { // only if "OK"
      document.getElementById(target).innerHTML = req.responseText;
    } else {
      document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function load(name, div) {
    ahah(name,div);
    return false;
}
</code></pre>

<p>On Link</p>

<pre><code>&lt;a href="wrapper.html" onclick="load('file1.html','content');return false;"&gt;File 1&lt;/a&gt;
&lt;a href="wrapper.html" onclick="load('file2.html','content');return false;"&gt;File 2&lt;/a&gt;
</code></pre>

<p>On content wrapper</p>

<pre><code>&lt;div id="content"&gt;&lt;/div&gt;
</code></pre>

<p>Let me know simple way to do this on jquery.</p>
