我有以下代码,请注意,即时通讯这样一个noob如何可以使用jquery脚本增加div的数量?增加div id与jquery
if($res >= 1){
$i=1;
while($row = mysqli_fetch_array($qry)){
echo "<div class='imgAddCntr'>
<div id='div".$i."' class='contentbox'>
//content here
</div>
<div id='imgAdd'>
<img class='images' alt='CDL Training' src='".$imgLInk.$row['img']."'/>
</div>
</div>";
$i++;
}
}
进出口试图针对上述循环及其DIV值
$(document).ready(function() {
$('#div1').hide();
$(".images").hover(
function() {
$("#div1").show();
},
function() {
$("#div1").hide();
});
});
任何帮助将不胜感激
请提供更多的细节,你在不清楚 – 2014-09-13 06:32:41
ID的问题应该是唯一的 – 2014-09-13 06:57:55