|
Learn Java Script Today | | | Over 5000 Free Fonts | | | Tutorials | | | Javascript Forum | | | Other Javascript Resources | | | Cheat Sheet |
Table Sorting is a curtesy of WebFX SampleJust click at the table headers to sort by that column
What do I need to use thisYou need to download tablesort.js file and include it by adding
the following line to your document <script type="text/javascript" src="tablesort.js"></script> You also need to organise your table into a table head and a table body and add the onclick handler to the table tag. The table should look like this: <table onclick="sortColumn(event)"> <thead> <tr>...</tr> ... </thead> <tbody> <tr>...</tr> ... </tbody> </table> You don't need to include a special CSS file but I recomend that you do it anyway because that the
arrow should use the webdings font. Download tablesort.css and add the
following line to the <link rel="STYLESHEET" type="text/css" href="tablesort.css"> What's nextDefining the sort
|
|