07-24-2023, 05:48 AM
In this jsfiddle, I would like the "#video" div to slide down completely and stay until the mouse is over "#wrap". But its going up and down even though the mouse is on #wrap. Any idea?
html:
<div id="wrap">
<div id="text">text</div>
<div id="video">video</div>
</div>
css:
#text
{
position: absolute;
top:20px;
width: 300px;
height: 200px;
background: #FAAC58;
margin-left:auto;
margin-right:auto;
}
#video
{
position: absolute;
top:20px;
width: 300px;
height: 200px;
display:none;
background: rgba(0,0,0,0.8);
}
Jscript:
$(document).ready(function(){
$("#wrap").mouseover(function(){
$("#video").slideDown("slow");
});
$("#wrap").mouseout(function(){
$("#video").slideUp("slow");
});
});
html:
<div id="wrap">
<div id="text">text</div>
<div id="video">video</div>
</div>
css:
#text
{
position: absolute;
top:20px;
width: 300px;
height: 200px;
background: #FAAC58;
margin-left:auto;
margin-right:auto;
}
#video
{
position: absolute;
top:20px;
width: 300px;
height: 200px;
display:none;
background: rgba(0,0,0,0.8);
}
Jscript:
$(document).ready(function(){
$("#wrap").mouseover(function(){
$("#video").slideDown("slow");
});
$("#wrap").mouseout(function(){
$("#video").slideUp("slow");
});
});
[To see links please register here]