【发布时间】:2011-08-11 21:31:35
【问题描述】:
我有 6 个这样的 tds:
<td><a href="#">link</a></td>
<td>Some text here</td>
<td><a href="#">link</a></td>
<td>Some other text here</td>
<td><a href="#">link</a></td>
<td>Some other other text here</td>
我想在将鼠标悬停在指向下一个 td 的链接上后添加类。例如。如果我将鼠标悬停在第二个 td 的链接上,下一个 td 将有一个类,例如 active 像这样
<td><a href="#">link</a></td>
<td>Some text here</td>
<td><a href="#">link</a></td> <!-- hoovering over this link -->
<td class="active">Some other text here</td> <!-- and this td will have class active-->
<td><a href="#">link</a></td>
<td>Some other other text here</td>
如何做到这一点?
【问题讨论】:
标签: jquery hover addclass html-table