NOTE!
- In tablesorter version 2.0.5 and older, only the metadata and headers options methods were available to set the parsers.
- In versions 2.0.11+, parsers could be set using class names.
- Currently (versions 2.3+), parsers can be set using any of the following methods, in order of priority:
- jQuery data
data-sorter="text"
(see the Javascript block below on how to set it directly). - metadata
class="{ sorter: "text" }"
. This requires the metadata plugin. - headers option
headers : { 0 : { sorter: "text" } }
. - header class name
class="sorter-text"
.
- jQuery data
Demo
First Name | Last Name | Age | Total | Discount | Date |
---|---|---|---|---|---|
Peter | Parker | 28 | ($9.99) | 20% | Jul 6, 2006 8:14 AM |
John | 33 | $19.99 | 25% | Dec 10, 2002 5:14 AM | |
Clark | Kent | 18 | 44% | Jan 12, 2003 11:14 AM | |
Bruce | Almighty | 45 | $153.19 | 44% | |
Bruce | Evans | 22 | N/A | Jan 18, 2007 9:12 AM | |
Evans | 18 | $13.19 | 11% | Jul 6, 2006 8:14 AM |