$(function () {
$(".menu2").hide();
$(".open").stop(true, true).mouseover(function() {
$(".menu2").fadeIn(100).animate({ top: '-50' }, 400);
});
$(".open").mouseleave(function() {
$(".menu2").stop(true, true).fadeTo('fast').animate({ top: '1' }, 100).hide();
})
});
#conteudo{
width:100%;
height:300px;
background:#36C;
}
.menu{
width:1365px;
height:30px;
background:#F00;
margin:0px auto;
}
.menu1{
width:450px;
height:30px;
background:#FFF;
}
.menu1 li{
width:150px;
height:30px;
background:#FF0;
list-style:none;
float:left;
}
.menu2{
width:150px;
height:90px;
background:;
margin-top:50px;
position:relative;
display:block;
}
.menu2 li{
width:150px;
height:30px;
background:#C30;
top:20px;
position:relative;
}
.menu2 li:hover{
width:150px;
height:30px;
background:#C60;
top:20px;
position:relative;
}
menu1 li ul li .open{
widht:150px;
height:500px;
background:#096;
position:absolute;
display:block;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><divid="conteudo">
<nav class="menu">
<ul class="menu1">
<li>Teste1</li>
<li class="open">Teste2
<ul class="menu2">
<li>Sub-Teste1</li>
<li>Sub-Teste2</li>
</ul>
</li>
<li>Teste3</li>
</ul>
</nav>
</div>
I would like that when the cursor was on top of the link, the submenu had the effect of appearing, as the link example.