Unobtrusive and with alternating row colors
Ramon Eijkemans pointed me to a script written by Stuart Langridge. This unobtrusive table sorting script was awesome, offering sort mechanisms for text, numbers, dates and currencies, by simply adding an external script to a page and a class to a table!
However, it lacked a few things, most importantly: support for alternated row classes. Working on it more, I found there were a few bugs to it too. So I started adapting it. At first there were just a few changes. Now more and more e-mails with feature requests are coming in, and I have started versioning my table sorting script.
Click on the headings to sort the table.
Quick start guide to sorting your tables
To get this script working, download the script, and add it to the
head section of your webpage like this:
class="sortable" and an id, for instance
id="sortabletable" to the table you want to sort, and you’re all done.
If you need more info, go to the tutorial.
License and download for the sortable table script
As of version 1.2.1, a European and an American version are available for download, to make it easier for people to start using it with the right date sorting method. Download it here:
- ZIP package, including the script in normal and US version, examples and sort images (8kb);
- Just the script, unzipped (9kb);
- Just the script, US version, unzipped (9kb);
Help me to improve your table sorting options!
It takes an awful lot of time to maintain scripts like these properly, and while I’m not charging, and won’t ever charge, anyone for the use of the script, if you like and use it, I’d appreciate a donation! You can donate using PayPal or buy me a book from my wishlist, if you have something else you’d like to give or send me, email me.