Client-side Table Sorting

Rank Album Artist Price
1 Before Your Love/A Moment Like This Clarkson, Kelly $4.49
2 Home Dixie Chicks $12.99
3 Rising, The Springsteen, Bruce $13.49
4 October Road Taylor, James $13.49
5 Bounce [Digipack] Bon Jovi $12.99

- Feb 12, 2003: Added notes, credits and adjusted fonts to make mirror-worthy.

- Feb 11, 2003: Original post of code with column indicators using CSS and the DOM.

- Feb 20, 2003: Changed to use non-obtrusive Javascript - meaning no onclick handlers on <th> elements. Now initialized by an initTable(tableId, columnTypes[]) function.

** This page and code is based on Porter Glendinning's sort table rows example from Web Builder 2002.