Tablesorter sorts some floating point numbers incorrectly
If I build a table containing 1.9, 9.9, 15.9, Tablesorter does the right thing when I click the headers. If I instead use the values 1.0, 9.0, 15.0, it incorrectly sorts them as 1.0, 15.0, 9.0. Have I gone crazy? I'm using jQuery 1.4.2 and Tablesorter 2.0.3. Here's some HTML that demonstrates the problem:
- <html>
- <head>
- <script src="public/javascripts/jquery.min.js" type="text/javascript"></script>
- <script src='public/javascripts/jquery.tablesorter.min.js' type='text/javascript'></script>
- </head>
- <body>
- <script language='javascript' type='text/javascript'>
- $(document).ready(function() { $(".test_table").tablesorter(); });
- </script>
- <table cellspacing="1" class="test_table">
- <thead>
- <tr>
- <th>broken table</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>1.0</td>
- </tr>
- <tr>
- <td>9.0</td>
- </tr>
- <tr>
- <td>15.0</td>
- </tr>
- </tbody>
- </table>
- <table cellspacing="1" class="test_table">
- <thead>
- <tr>
- <th>working table</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>1.9</td>
- </tr>
- <tr>
- <td>9.9</td>
- </tr>
- <tr>
- <td>15.9</td>
- </tr>
- </tbody>
- </table>
- </body>
- </html>