0
I’m using the function .mouseover()
and .mouseout()
. Both work but I have a problem.
The code below is what I’m using for this purpose. The effect always does the animation of <div>
: both grows and Minga (decreases), because it alternates between being in a <div>
and another.
When you enter a <div>
with .mouseover()
I would like it not to close while navigating with the cursor div
s daughters.
$(".chevr").mouseover(function() {
$(".prev_noti").animate({
width: "30%"
}, 200);
$(".extra").css("width", "initial");
});
$(".prev_noti").mouseout(function() {
$(".prev_noti").animate({
width: "0%"
}, 200);
});
.prev_noti {
background: black;
position: fixed;
top: 40%;
}
.chevr {
border-right: 1px solid white;
padding: 50px 10px 50px 10px;
white-space: nowrap;
overflow: hidden;
float: left;
}
.extra {
width: 0px;
overflow: hidden;
float: left;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="prev_noti">
<div class="chevr">
<i class="fa fa-chevron-right fa-2x" aria-hidden="true"></i>
</div>
<div class="extra">
Textoooooooo
</div>
</div>