I have the following code that when I put it to run, it gives display: none and display: block on all elements and I would like it to apply this effect only to the current element:
//jQuery
$( ".titulo" ).mouseover (
function() {
$(".overlayContent").css("display", "none");
}
);
$( ".titulo" ).mouseout (
function() {
$(".overlayContent").css("display", "block");
}
);
//HTML
<article>
<span class="overlayContent" style="display: block;"></span>
<h2 class="titulo" style="padding: 0 75px">Post</h2>
</article>
This span is background-color:#000
with opacity:.5
that disappears when mouseover. Only they all disappear and I wanted only the current to disappear. You can see the effect on this link link