現在、データベースの結果からの while ループであるテーブルがあります。私の表の行には、+ または - の日数になる値が含まれています。td に ("-") または ("+") が含まれているかどうかを調べる jQuery スクリプトを作成しようとしています。その行の最初の td に css スタイルを適用します。現時点では、すべての行の最初の td ごとに適用されます。
$("tr td:nth-child(7):contains('+')").each(function() {
$('tr td:first-child').css('background-color', 'blue');
});