jQuery Funtion Help
jQuery Funtion Help
- Started
- Last post
- 2 Responses
- dbloc
$( ".product-index" ).hover(
function() {
$(".overlay").show();
}, function() {
$(".overlay").hide();
}
);There are multiple .product-index divs. How to I target the .overlay in the product-index that you are currently hovering?
- dbloc0
got it.
$( ".product-index" ).hover(
function() {
$( this ).find( ".overlay" ).show();
}, function() {
$( this ).find( ".overlay" ).hide();
}
);
- orrinward20
This can also likely be achieve with pure css.
HTML (EMMET)
.product-index>.overlayCSS
.product-index .overlay{display:none;}
.product-index:hover .overlay{display:block;}