【发布时间】:2013-04-18 14:49:16
【问题描述】:
如何更改具有特定样式的 tr 内的 td 单元格的颜色?
例如:
<tr style="display: table-row">
<td></td>
<td></td>
</tr>
到目前为止我已经这样做了,但它并没有完全起作用:
if ($('.mydiv').css('display') == 'table-row') {
$(this).siblings('td').css("background-color", "white");
}
【问题讨论】:
-
我会使用 children() 选择器。
$("tr").children("td").css("blabla")...
标签: jquery css html-table tablerow