I have the following HTML code:
<li style="background-image: url(fotoSYS)" class="produtos f-left margin-right-30 margin-top-30">
<div style="background-color:codigoSYS"class="marcador"></div>
<h2>tituloSYS</h2>
</li>
CSS looks like this:
.produtos{
width: 294px;
height: 349px;
background-color: #f1f2f2;
border: 3px solid transparent;
position: relative;
cursor: pointer;
transition: all .4s ease-out;
}
.produtosHover{
border-color: #dddb00;
box-shadow: 0 0 25px gray;
margin-top: 15px;
display: none;
}
Jquery looks like this:
$(".produtos").hover(
function() {
$(this).children(".produtosHover").show();
},
function() {
$(this).children(".produtosHover").hide();
}
);
I want, when I hover over produtos
, it will apply produtosHover
, which will only put a border, a box and a margin-top, I used children
because it will have more than an element.
I'm going to do it via Jquery because border-color
will be manageable by the client.
However, I do not know what's wrong = /