$('.product-list').hover(
$('.product-list-thumbnail ').css({'opacity': "0.2;"})
);
On hover of an element i'm trying to change the opacity of another element. I tried using CSS, but this is the only solution I could find.
My HTML looks like:
<article class="wrapper">
<div class="product-list-thumbnail "><img src="" /></div>
<div class="product-list">Product details</div>
</article>
As I have a lot of these on the page. How can I target the class .product-list-thumbnail that's within the container my current class is in?
Thanks!
.wrapper:hover .product-list-thumbnail { opacity: 0.2; }but the element you're changing the opacity off must be a child of the one you're hovering over.