Table Sorter is an awesome jQuery script by Christian Bach that allows dynamic multi-column sorting of tables. This script works flawlessly on the client-side, performing its magic without the need for a page refresh. It easily parses many data types including: text, URI’s, integers, currency, floats, IP addresses, dates and time.
Table Sorter is lightweight, works across all the major browsers, and has been configured to support both HTML and CSV table data. Click any of the column headings to alphabetically sort via that column.
- Click and download the table-sorter.zip file above
- If your browser or operating system automatically unzips the file, please compress it back into a .zip file
- Click the Import tab
- Upload the table-sorter.zip file
- For the code block called Table Sorter – Includes, select the Assignment checkbox (e.g. Page, Post, etc) where you will add your table. Click Save
- For the code block called Table Sorter – Config, select the same Assignment checkbox as above. Again click Save
- For the code block called Table Sorter – HTML, leave this as is for now
- Go to the backend editor of your Page (or Post) where you will add your table
- Click the CJT Shortcode embed button (i.e. on the editor toolbar) and select Table Sorter – HTML
- Update your Page (or Post) and then view the result
- Of course you would need to modify the Table Sorter – HTML code block to represent your own table data
- You can modify the Table Sorter script via many parameters in the Table Sorter – Config code block. For example, you could modify the theme code from bootstrap to dark.
- If you require more information on the Table Sorter parameters, please click here: https://mottie.github.io/tablesorter/docs/index.html. Also, you can check out Mottie’s code fiddles here: http://jsfiddle.net/user/Mottie/fiddles
Written by Christian Bach.
Documentation written by Brian Ghidinelli, based on Mike Alsup’s great documentation.
Additional & Missing documentation, alphanumeric sort, numerous widgets, unit testing and other changes added by Mottie.
Thanks to all that have contributed code, comments, feedback and everything else. A special thanks goes out to:
- themilkman (maintains jquery-tablesorter-rails)
- and all the contributors!