Stuck with checkbox selecting

Stuck with checkbox selecting

Hi all,

I have a situation where there is a matrix grid of checkboxes, and individual entire rows or columns must be able to be toggled between checked and unchecked state. I put the page up here: http://www.jontakiff.com/matrix/preferences.html#

Ok. For the horizontal rows it was pretty easy. This was the code that did the trick:

$(function() {
$(".select-row a").toggle(
function(event){
$(this).parent().parent().find("input[type=checkbox]").attr("checked",true);},
function(event) {
$(this).parent().parent().find("input[type=checkbox]").attr("checked",false);
}
);
});

Simple, right? But the columns part, I can't figure out. I put everything in each column in the same class, with the hopes that on click, I'd be able to figure out a way to take the class value of the link - (this).className - and use it to target checkboxes in the same class. But I have no idea how to do this. I haven't been at jquery that long. I'd be incredibly grateful for some help, a starting point, a command that would work....