I see this post on highlighting even columns but can I highlight only selected columns?
Here is the code they use:
$(\"table.Table22 > tbody >
If you create a link in your table headers, you can do something like this:
$("table.tbl th a").click(function() {
var colnum = $(this).closest("th").prevAll("th").length;
$(this).closest("table").find("tr td").removeClass("highlight");
$(this).closest("table").find("tr td:eq(" + colnum + ")").addClass("highlight");
}
That will set all cells below the clicked link to class "highlight".
Of course, you should still set the correct style in your CSS file:
table.tbl tr .highlight { background-color: blue; }