I need to fadeToggle some classes when I am hover on image. I am using Opencart.
Here is how it works https://i.stack.imgur.com/V7dCu.jpg
As you can see it works, but when I click to the List or Grid(top right) the effect is not working.
Jquery code:
$(document).ready(function(){
$(".image").hover(function(){
$(".wishlist, .compare").fadeToggle();
});
});
HTML code:
<div class="image">
<a href="<?php echo $product['href']; ?>">
<img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" />
</a>
<div class="wishlist" style="display: none;"style="display: none;"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><i class="ebenicon ebenicon-plus-square"></i><?php echo $button_wishlist; ?></a></div>
<div class="compare" style="display: none;">
<a onclick="addToCompare('<?php echo $product['product_id']; ?>');">
<i class="ebenicon ebenicon-plus-square"></i><?php echo $button_compare; ?></a></div>
</div>