すべての行と列を反復できますが、テーブルにセルが結合されている場合は機能しません。すべての通常の列(結合されたセルがない)の結合された行を通過しません。
私のスクリプト:
$('#test tr').each(function() {
$(this).find('td').each(function(colIndex)
{
if(colIndex > 1)
{
$(this).css('background-color', 'red');
}
});
});