1
I want to tag p
be replaced by img
in Hover, already bringing an image I have in the directory. Is it possible to do something similar? If possible, in the same function.
Code:
$(function(){
$(".produto").hover(function(){
$(this).toggleClass('produtocomprar produto');
});
});
.produto {
position: relative;
width: 190px;
height: 342px;
margin-left: 40px;
margin-top: 20px;
float: left;
display: flex;
flex-direction: column;
background-color: #ffffff;
}
.produtocomprar {
position: relative;
width: 190px;
height: 340px;
margin-left: 40px;
margin-top: 20px;
background: #f6f6f6;
float: left;
display: flex;
flex-direction: column;
border-radius: 5px;
border: dotted 1px;
box-shadow: 1px rgba(0, 0, 0, 0.5);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="produto">
<div class="produtodesc">
<h5 class="produtotitulo">Hidratante Andiroba Linha Amazônica</h5>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ac
accumsan erat.</p>
<div class="prodpreco">
<h4 class="de">De: R$ 150,00</h4>
<h3 class="por">Por: R$ 80,00</h3>
</div>
<a href="#" class="detalhes">+ Detalhes</a>
</div>
</div>
Perfect guy, thank you so much!
– André Vitor