[jQuery] jQuery tablesorter and highlight rows
Hello all,
I'm using jQuery tablesorter to sort the content of my table. the
row are highlighted and I'm no using the 'zebra' widget. The table id
is : admin_table, and the code look like this :
$("#admin_table").tablesorter();
$("#admin_table tr:odd").addClass("odd"); //add the odd class to the
odd rows
When you click on the table header with the id sort_age,
$("#sort_age").click(function()
{
$("#admin_table tr").removeClass("odd"); //remove the ood class
on all of the rows
$("#admin_table tr:odd").addClass("odd"); //add back the odd on the
odd rows
}
But the highlight is mixed up the firts time you clicked, and every
things goes well after.
Can you help me with this issues ?
Thanks all.