I have a 3x3 table.
I want to select each td on a specific line. (For example, the second line)
$('table > tbody > tr:nth-child(2) > td').css("background-color","red");
Above code sets only the 2nd row of the 1st column to red.
I expected it to change every td on the second line, but it seems like I'm missing something.
Why is the above code not working as expected?
( EDIT : I am using Chrome 13 with jQuery 1.7.1)
source share