Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
-jQuery を使用して、2 番目の列に文字が含まれるすべての行を強調表示したいと思います。
-
2番目の列の詳細は次のとおりです...
どうすればこれを達成できますか?
ルーカスの2nd答えはjquery 1.4では機能しませんが、これは機能します:
2nd
$('tr').find('td:eq(1):contains(-)').parent().css('backgroundColor', 'yellow');
$("tr td:eq(1):contains('-')").parent().addClass("highlight");
@recursive : 「eq」のセレクターを変更しました、ありがとう。