I just tested it back in the original script and used Firebug to track error … error is:
this.thead is null
var numOfHeaders = this.thead.rows[0].getElements(‘th’).length in HtmlTable.Extended.js line 63
hope this helps
the solution i found to use DataTables plugin for JQuery which pretty much does same thing as your script for table sort right now:
http://datatables.net/
here is what i changed your code to:
function sortTable()
{
$(‘#roster_table’).dataTable( {
“aaSorting”: [[ 1, “desc” ]] , “bJQueryUI”: true, “bPaginate”: false
} );
}
$(document).ready(sortTable);
Of course you need the main jquery lib included before this ( i have it in the header of joomla template)
Cheers 🙂