Ajax Bestiary: A Javascript Field Guide
 
Ajax Bestiary: A Javascript Field Guide
 
 

A Clean and Refreshing Sortable Table

Posted by Don Albrecht

A nice unobtrusive table sort that doesn’t rely on any bulky tookits.  Could be just what the doctor ordered for your next project or for adding new life to the clunky old app running the back office.

table1
The Features
  • Plays nicely with the JavaScript global namespace (the script creates and reuses only one JavaScript object)
  • The new script sorts (on average – based on my very non-scientific calculations), 5 times faster than its predecessor
  • The plug-in architecture makes writing custom sort functions a breeze
  • The script can now highlight both alternate rows and full columns on a table by table basis.
  • Like its predecessor, the script is fully keyboard accessible
  • The script can correctly determine a columns datatype should a datatype not be explicitly defined
  • The script is smart enough not to sort columns containing identical data
  • Sort routines can now be initiated using JavaScript
  • Tables can be automatically sorted on a column of your choice
  • Before-sort and after-sort callback functions can now be defined for individual tables
  • The script can now “reverse sort”

Check it out at:

http://www.frequency-decoder.com/2006/09/16/unobtrusive-table-sort-script-revisited


Comments are closed.