I have such a structured code
<?php
$p=0;
$delay=0;
while($p<=16){
$p++;
$delay+=0.2;
?>
<div class="column wow fadeInDown" onmouseout="outside(<?=$p; ?>)" onmouseover="inside(<?=$p; ?>)" data-detail="<?=$p; ?>" data-wow-delay="<?=$delay; ?>S">
<div class="details detail<?=$p; ?>" style="">
<div style="position:absolute;top:50%;left:50%;transform: translate(-50%,-50%);color:white;">
<b>Nome do Produto</b>
</div>
</div>
<img src="images/teste/<?=$p; ?>.jpg" style="max-width:100%;" />
</div>
<?php } ?>
In the above code there is a gallery of images where when you go over it would show the name of the product. However, when I step on top it shows but if I move on to another the previous one holds. How do I hide others and keep the same?
Here are the functions inside
and outside
function inside(e){
$(".detail"+e).fadeIn(500);
}
function outside(e){
$(".detail"+e).fadeOut(500);
}