<div id="nc1">
<table>
<tr>
<td colspan="2">Nulla venenatis rhoncus libero ac interdum. </td>
</tr>
<tr> <td colspan="2">is a long established fact that a reader will be distracted by the <br>readable content of a page when looking at its layout.
<br>The point of using Lorem Ipsum is that it has a more-or-less normal
<br>distribution of letters, as opposed to using 'Content here, content here', <br>making it look like
</tr>
<tr>
<td><a href="#" id="hide">Hide</a></td>
<td>Read More</td>
</tr>
</table>
</div>
这是我的剧本
$("#news1").hover(function(){
$("#nc1").fadeIn();
});
如何在不使其成为函数的情况下循环此链接
<td><a id="news1" href="#">Nulla venenatis rhoncus libero ac interdum. </a></td>
</tr>
<tr>
<td>Decemeber 09,2012</td>
<td><a id="news2" href="#">Proin gravida placerat nulla, euismod consectetur mauris tincidunt a. </a></td>
</tr>
<tr>
<td>Decemeber 09,2012</td>
<td><a id="news3" href="#"> euismod consectetur mauris tincidunt a. </a></td>
</tr>
答案 0 :(得分:1)
$("#news1").hover(function(){
for (var i = 1; i < NumberOfDivs; i++){
$("#nc"+i).fadeIn();
}
});