Blog Archive for October 16, 2010

Tablesorter Decimal Sorting

October 16, 2010

I've had trouble with the jQuery tablesorter not sorting correctly where some of the data contains decimal points. It seems to default back to sorting them as strings.

To get around this problem, I implemented the following new parser, which sorts accurately by converting the numbers to floats first:

$ …