I found a solution to ordering serial numbers based on @Chris Laplante code. The solution is launched by running sortEnd only the first time the table is created. Therefore, I need to edit the source code. Must be considered when upgrading tablesorter software.
In the jquery.tablesorter.js file around line 370, we can find the trigger:
// trigger sortend setTimeout(function () { $(table).trigger("sortEnd"); }, 0);
Edit for:
// trigger sortend if (runonce == undefined){ setTimeout(function () { $(table).trigger("sortEnd"); }, 0); runonce = true; }
and define the runonce variable in a specific place above the appendToTable function:
var runonce; function appendToTable(table, cache) { ...
You can check the result at: http://formulaeweb.es/resultados.php by clicking "Puntos".
Javi ps
source share