JQuery Tablesorter, use variable in sortlist
<p>I have a HTML table computed out of SQL query result.
Number of columns keep varying. Last column is "Total". 
I want to present the table sorted by last column, descending.</p>

<p>Could anybody help me on how to achieve this?</p>

<p>All examples I see on internet have hard-coded column numbers in sortlist line.</p>

<p>I tried following... (didn't work)</p>

<pre><code>var tableId = this.id;
var lastCol = $('#'+tableId).find('tr')[0].cells.length;
$('#'+tableId).tablesorter(
{
headers: {
       0: { 
       sorter: false
       }
},
sortList:[[lastCol,1],[1,0]],
widgets: ['zebra']
}); 
</code></pre>

<p>Needless to say... I am a newbie.
Any help/suggestion is appreciated...</p>
