I thought this was going to be a royal pain but it turned out to be VERY simple thanks to a small, free, simple little tool.
If you have a table on your website and you want to let visitors sort the data in it by just clicking a column heading, follow these steps:
<script src="sorttable.js"></script>
<table class="sortable">
Note that the library’s JavaScript file is called sorttable
(two Ts), but the class you add to the table is sortable
(one T).
This little jscript and two VERY simple changes to your code is all it takes. It took me longer to read the instructions than it did to follow them.
This was taken directly from http://www.kryogenix.org/code/browser/sorttable/ … and thank you to Suart Langridge for his fine coding efforts.
This website uses cookies.