ゼブラ ストライプ (奇数行ごとに異なる背景色) のテーブルがあります。行の編集後にjQueryが提供するハイライト効果(背景色を3秒間変化させる)を適用します。白い行 (背景色なし) でのみ機能します。
このハイライト効果を任意の行に適用できる可能性はありますか?
JavaScript ファイルのコードは次のとおりです。
$('#MyRowToHighlight').effect("highlight", {}, 1500);
これが私のテーブルの頭です:
<table class="zebra-striped">
<thead>
<tr>
<th>Company</th>
<th>Username</th>
...
ゼブラ ストライプの CSS は次のとおりです。
.zebra-striped tbody tr:nth-child(odd) td{background-color:#f9f9f9;}
.zebra-striped tbody tr:hover td{background-color:#f5f5f5;}
ありがとう。