Hi,

I've just read the Jquery book and though I understood a bit about
selectors, turned out I was wrong!

I am trying style every cell in a table but style the left and right
most colums differently.

I start with three classes....

GridLeftCell
GridMiddleCell
GridRightCell

... and I style every cell with  "GridCellMiddle"

I then try to replace the class on all cells in the first column by
doing the following..


$(document).ready(function(){

    $(".Grid tbody td").addClass("GridMiddleCell");

    $(".Grid tbody tr td:first").removeClass("GridMiddleCell");
<-----------------
  });



I thought this would drill down to each TR and select the first TD in
eact TR, but it is only affecting the first cell in the first row.

Anybody know what selector I am supposed to be using ?

Thanks, Jon

Reply via email to