Styling Table Cells with jQuery.tablesorter

The plugin jQuery.tablesorter is handy for allowing users to dynamically sort tables by clicking the column headings. Out of the box, the plugin assigns a class to the <th> that is currently being sorted upon, but <td>s are not marked in any way. I wanted to add a subtle visual cue to the entire column on a recent project - something like this:

Sorted_table

A few lines of Javascript will handle this scenario. If you find yourself needing a similar effect, you can use (and perhaps improve upon) the following code:

Clicky