nth-child and descendant selector not selecting all expected elements
My DOM is as follows: http://jsfiddle.net/pimvdb/AHJXk/1/ . <table> <tr> <td> <input type="text"><input type="text"> </td> <td> <input type="text"><input type="text"> </td> </tr> <tr> <td> <input type="text"><input type="text"> </td> <td> <input type="text"><input type="text"> </td> </tr> </table> I'm trying to select all input s in the second td of each tr , i.e. four in total. I thought the following selector would work: $('table tr td:nth-child(2) input') But it only returns the first input of each second td (two in total). Why is that? If I do: $('table tr td:nth-child(1) input') then I do