В этом jsfiddle я хотел бы, чтобы div «#video» полностью сместился и остался до тех пор, пока мышь не закончится над «#wrap». Но его движение вверх и вниз, хотя мышь находится на #wrap. Есть идеи?Javascript: Div слайд вниз на другом div
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");
});
});
http://jsfiddle.net/ZyUYN/1045/
Благодаря @Omar Elawady – sri