I have the following code: I would like to know some function that can stop the cellphone by mouseover for about 10 seconds, after the arrow is removed from above. Thank you in advance!
<!DOCTYPE html>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-3.2.1.js"type="text/javascript"></script>
<link rel="icon" href="img/rota_logo.png">
<title>Rota Calculada</title>
<script type="text/javascript">
$(document).ready(function () {
var $ativa = $('.mostra');
var $elemento = $('.elemento');
$ativa.mouseenter(function () {
if ($elemento.hasClass('add-efeito')) {
return false;
} else {
$elemento.addClass('add-efeito');
}
});
$ativa.mouseleave(function () {
if ($elemento.hasClass('add-efeito')) {
$elemento.removeClass('add-efeito');
}
});
});
</script>
<style>
div.elemento {
background-image: url(https://orig00.deviantart.net/9a2c/f/2012/136/f/0/iphone_3_png_by_aleiitah-d4zz86b.png);
z-index: 1;
height: 311px;
width: 165px;
position: fixed;
bottom: 0;
left: 0;
display: none
}
div.elemento.add-efeito {
display: block;
animation: efeito .5s
}
@keyframes efeito {
from {
bottom: -35rem
} to {
bottom: 0
}
}
}
</style>
</head>
<body>
<div class="mostra">Passe o mouse por cima</div>
<div class="elemento"></div>
</body>
</html>