我正在尝试在悬停图像上显示描述,但是当悬停在图像上时,所有图像都会显示描述。我有以下代码....
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } ?>
<div style="display:none;" class="de"> Nunc ornare adipiscing orci eu consectetur. Ut justo libero, porttitor ac elementum luctus, bland..
<img alt="Based on 2 reviews." src="catalog/view/theme/kid/stars1-4.png"/>
</div>
<script type="text/javascript">
$this('.image').hover(function() {
// mouseOver function
$('.de').show();
}, function() {
// mouseOut function
$('.de').hide();
});
</script>