Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 如何在循环中显示div_Jquery_Html - Fatal编程技术网

Jquery 如何在循环中显示div

Jquery 如何在循环中显示div,jquery,html,Jquery,Html,例如,我有一个链接id,它等于news1或news2等等!如果我将鼠标悬停在链接上,它会显示如下信息 <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 th

例如,我有一个链接id,它等于news1或news2等等!如果我将鼠标悬停在链接上,它会显示如下信息

<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>
如何循环此链接而不使其成为函数

    <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>

2012年12月9日
2012年12月9日
像这样:

$("#news1").hover(function(){
     for (var i = 1; i < NumberOfDivs; i++){
         $("#nc"+i).fadeIn();
     }
});
$(“#新闻1”).hover(函数(){
对于(变量i=1;i
您应该接受一些问题的答案。。。
$("#news1").hover(function(){
     for (var i = 1; i < NumberOfDivs; i++){
         $("#nc"+i).fadeIn();
     }
});