标签: jquery jquery-selectors
我正在尝试将css类添加到我表中每个tr(行)的第一个td(单元格)(而不是其他td)。< / p>
有人可以帮助我使用jQuery选择器吗?
谢谢!
答案 0 :(得分:10)
使用first-child选择器:
$("table tr td:first-child").text("I am the first child of the row");
一点测试:http://jsfiddle.net/WxzfQ/