[jQuery] Tablesorter: what am I doing wrong?
Good morning!
I'm trying to use tablesorter on a dynamically generated table. Most
of the columns sort fine. However, I'm having issues with the number
columns.
One of the columns is called "Account Number" and it's a series of
integers. When sorted, I get this sort of effect:
Acct #
--------
809
808
8079
807
806
Which seems to me like it's sorting the numbers as if they were
strings and not integers.
Another column is a series of floats representing owed balances on the
accounts. Again, it seems to be sorting as if we're dealing with
strings.
Amount
-----------
-57.60
-61.00
-667.98
-7.10
-93.46
0.07
0.08
0.26
0.78
I'm invoking the tablesorter as follows:
<script type="text/javascript">
$(document).ready( function() {
$('#openaccounts').tableSorter({
stripingRowClass: ['', 'alt'],
stripeRowsOnStartUp: true,
});
});
</script>
Any tablesorting gurus out there that can help me figure out what I'm
doing wrong?