one more solution - $("tr").find("td:eq(0)").addClass("someClass");
On 6/30/07, John Resig <[EMAIL PROTECTED]> wrote:
Err, I meant Karl - sorry! On 6/30/07, John Resig <[EMAIL PROTECTED]> wrote: > The solution is what Klaus posted - you just have to use :first-child. > > $("td:first-child").addClass("tomas"); > > --John > > On 6/8/07, jorgeBadaBing <[EMAIL PROTECTED]> wrote: > > > > I have been looking online at the documentation and don't seen to have > > any luck find a way of doing this. > > > > So far I can do this: > > > > $("td:first").addClass("tomas"); > > > > Which applies a class to the first td it founds in the table. > > > > How can I select the first td for every tr? > > > > Help will be much appreciated. > > > > Thanks! > > > > >