title: JQuery Tablesorter not a function
body: <p>I am parsing an XML file into a table and want to use the jquery tablesorter. I've tried many things, of which none have worked.  I was parsing the XML file first via AJAX and then calling tablesorter on my table.  The way I have my code now, I'm calling tablesorter on my table, running AJAX, and then updating the table with <code>$("#table).trigger("update")</code>. I am getting this error no matter whether I have it the first way or the second way: "$(#table).tablesorter() is not a function". Any ideas? Code is listed below for JS and HTML.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Read XML&lt;/title&gt;
      &lt;script type="text/javascript" src="jquery-1.7.1.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="jquery-latest.js"&lt;/script&gt;
      &lt;script type="text/javascript" src="jquery.tablesorter.js"&lt;/script&gt;
      &lt;script type="text/javascript" src="custom.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;table id="table" border="1"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Item #&lt;/th&gt;
                  &lt;th&gt;Shape&lt;/th&gt;
                  &lt;th&gt;Weight&lt;/th&gt;
                  &lt;th&gt;Color&lt;/th&gt;
                  &lt;th&gt;Clarity&lt;/th&gt;
                  &lt;th&gt;Price($)&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$(document).ready(function() {
  $("#table").tablesorter();
   $.ajax({
       type: "GET",
       url: "tutorial.xml",
       dataType: "xml",
       success: parseXml
   });
  $("#table").trigger("update");
  });
  
  function parseXml(xml)
  {
      $(xml).find("diamond").each(function()
      {
          $("#table tbody").after("&lt;tr&gt;&lt;td&gt;" + $(this).find("id").text() + 
          "&lt;/td&gt;&lt;td&gt;" + $(this).find("shape").text() + "&lt;/td&gt;&lt;td&gt;" + $(this).find("weight").text() + 
          "&lt;/td&gt;&lt;td&gt;" + $(this).find("color").text() + "&lt;/td&gt;&lt;td&gt;" + $(this).find("clarity").text() + 
          "&lt;/td&gt;&lt;td&gt;" + $(this).find("price").text() + "&lt;/td&gt;&lt;/tr&gt;");
      });
  }
  </code></pre>