title: jQuery tablesorter - loss of functionality after AJAX call
body: <p>I have recently been experimenting with the tablesorter plugin for jQuery. I have successfully got it up and running in once instance, and am very impressed. However, I have tried to apply the tablesorter to a different table, only to encounter some difficulties...</p>
  
  <p>Basically the table causing a problem has a <code>&lt;ul&gt;</code> above it which acts as a set of tabs for the table. so if you click one of these tabs, an AJAX call is made and the table is repopulated with the rows relevant to the specific tab clicked. When the page initially loads (i.e. before a tab has been clicked) the tablesorter functionality works exactly as expected.</p>
  
  <p>But when a tab is clicked and the table repopulated, the functionality disappears, rendering it without the sortable feature. Even if you go back to the original tab, after clicking another, the functionality does not return - the only way to do so is a physical refresh of the page in the browser.</p>
  
  <p>I have seen a solution which seems similar to my problem on this site, and someone recommends using the jQuery plugin, livequery. I have tried this but to no avail :-(</p>
  
  <p>If someone has any suggestions I would be most appreciative. I can post code snippets if it would help (though I know the instantiation code for tablesorter is fine as it works on tables with no tabs - so it's definitely not that!)</p>
  
  <p><strong>EDIT:</strong>
  As requested, here are some code snippets:<br>
  The table being sorted is <code>&lt;table id="#sortableTable#"&gt;..&lt;/table&gt;</code>, the instantiation code for tablesorter I am using is:</p>
  
  <pre><code>$(document).ready(function() 
  { 
      $("#sortableTable").tablesorter(
      {
          headers: //disable any headers not worthy of sorting!
          {
              0: { sorter: false },
              5: { sorter: false }
          },
          sortMultiSortKey: 'ctrlKey',
          debug:true,
          widgets: ['zebra']
      }); 
  });
  </code></pre>
  
  <p>And I tried to rig up livequery as follows:</p>
  
  <pre><code>$("#sortableTable").livequery(function(){
     $(this).tablesorter();
  });
  </code></pre>
  
  <p>This has not helped though... I am not sure whether I should use the id of the table with livequery as it is the click on the <code>&lt;ul&gt;</code> I should be responding to, which is of course not part of the table itself. I have tried a number of variations in the hope that one of them will help, but to no avail :-(</p>