Hover a div and change the class of the child div.
Hi All,
I'm trying to create a sliding div inside a product on a product category page. But I can't figure out how to target just the div inside the div I'm hovering.
Here is my js code ("jQuery" is needed instead of "?" in Wordpress ) ...
- <script>
- jQuery( ".woocommerce ul.products li.product, .woocommerce-page ul.products li.product" ).hover(function() {
- jQuery( ".product-info-slide" ).toggleClass( "showMe", "hideMe" );
- });
- </script>
It toggles all the the .product-info-slide divs. I just want the one inside the hovered div.
Thanks.
Dan