I've got this code snippet here and, oh boy, am I a newbie. How can I increase the number in the div using a jQuery script?
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++;
}
}
I'm attempting to access the loop above and its associated div values
$(document).ready(function() {
$('#div1').hide();
$(".images").hover(
function () {
$("#div1").show();
},
function () {
$("#div1").hide();
});
});
Any guidance would be greatly appreciated