2
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 you to apply this effect only on 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 a background-color:#000
with opacity:.5
that disappears when mouseover. Only that all disappear and I wanted only the current to disappear. You can see the effect on this link http://catalogos.axitech.com.br/
@Kazzkiq doesn’t actually work because the only thing that comes up is
overlay 0.5
between the image and the title positioned byposition:absolute
andz-index
respective. If inspect element will see exactly the position of the elements.– Marcos Vinicius
And do you want the overlay to disappear only when you pass the code in the title? Or can it be in the whole block? It can only be with CSS or you want the solution with Javascript?
– Kazzkiq
@Kazzkiq can be on the whole block. I tried on the whole block but it flashed like disco so I started trying with the title.
– Marcos Vinicius