<table border=2>
<tr class="here1 yes">
<td>aaa1</td><td>bbb1</td>
</tr>
<tr class="here2 yes">
<td>aaa2</td><td>bbb2</td>
</tr>
<tr class="here55 yes">
<td>aaa3</td><td>bbb3</td>
</tr>
</table>
<table border=2>
<tr class="here1 yes">
<td>ccc1</td><td>ddd1</td>
</tr>
<tr class="here2 yes">
<td>ccc2</td><td>ddd2</td>
</tr>
<tr class="here55 yes">
<td>ccc3</td><td>ddd3</td>
</tr>
</table>
.yes:hover {
background-color: red;
}
LIVE:http://jsfiddle.net/KzzW8/將鼠標懸停在兩張桌子上的課程?
上面表與下面的PHP生成:
`<tr class="here<? echo $i ?> yes">`
我想上TR.here1
鼠標懸停把任何TR.here1
的內容RED其中從屬TD
是在組中:(aaa1,bbb1,ccc1,ddd1)不管它在哪個表中。
我相信我可以使用jQuery來做到這一點。這可能嗎?
您能否以更清晰的方式解釋您想要執行的操作? – PriestVallon
我不明白你的問題 –
如果我把鼠標懸停在類here1上,那麼這個類應該是背景顏色:在所有類中的紅色here1在頁面上(在我的例子中在兩個表中) –