Create A Sortable HTML Table

On my website I have a comparison table listing 101 products.
http://www.multivitaminguide.org/daily-multivitamins.html

The table has 4 columns - Company, Product, Effectiveness and Rank.

I want visitors to be able to sort the table values by clicking on the heading of any column.

The Company and Product columns will be sorted alphabetically.
The Effectives and Rank tables will be sorted numerically.

I would like to make the table headings clickable, but I want to preserve the white color of the heading. That means that you have to create a new class for hyperlinks in my CSS.

Also the other challenging part is sorting the numbers. The table has to soft correctly by Rank (from 1 to 101) without displaying "1" as "001".

Search All Jobs:

Job Details

  • Job Type
  • Fixed Price Job
  • Budget
  • Max $20
  • Start Date
  • 02/03/2012 10:23:57 PM
  • Job Status
  • Job Expired