Pew Pew Laser Blog

Code. Glass art. Games. Baking. Cats. From Seattle, Washington and various sundry satellite locations.

Pew Pew Laser Blog Archives — by Blog ID

jQuery - Tablesorter.


Check out this table. If you've got JavaScript enabled, you'll see a highlighted row when you move your mouse over it. This is courtesy of jQuery. You'll also be able to sort the columns by clicking on a header, and the alternate row coloring will match the sorted row ordering. These additions come from a jQuery plugin, tablesorter.

Customer Date City Store ID Amount
ASH (A) 5/03/2006 Bellvue 16 508.51
BARBUR (B) 7/26/2004 Portland 13 8512.91
COUCH (C) 07/04/2006 Seattle 23 -4118.45
DIVISION (D) 07/11/2006 Tacoma 12 89.32
FLANDERS (NE) 09/22/2004 Centralia 24 480.41
HOLGATE (H) 12/2/2005 Bellvue 11 -56.15
BURNSIDE (B) 09/14/2004 Portland 17 600.64

Pay attention Hollywood folks - this method of table sorting is much better than previous implementations. The jQuery/tablesorter method resolves spacing issues, and has TONS of extra abilities. Check out my jQuery tablesorter article for a detailed discussion of the code.


Tags: javascript jquery

Authorized users may log-in to leave a comment.

Last Blog: Iron DS Players.

Next Blog: jQuery - Vertical Show / Hide.