Millet jQuery drop-down box to achieve

<div class = "daohanglan"> 
<div class = "dh"> millet phone <- multiple customized ->
<div class = "dhbottom">
     </ div>
   </ div>
</ div>
 
.dh{

height: 88px;
float: left;
font-size: 16px;
text-align:center;
line-height:88px;
padding-left: 20px;
color: #333;
/*margin-right: 5px;*/
}
.daohanglan{
width: 820px;
height: 88px;

padding: 12px 0 0 30px;
float: left;
}
.dhbottom{
width: 100%;
background-color: white;
position: absolute;
left: 0;
right: 100px;
z-index: 787;
display: none;
}


$ (Document) .ready (function () {
the let Tag = 0;
$ ( "daohanglan.") MouseEnter (function () {<- daohanglan navigation bar block is located, .dh title navigation display.!. , .dhbottom to move out of the list to be displayed ->
        tag=3;
console.log("daohanglan移入");
});
$('.dh').hover(function(){
$(this).mouseenter(function(){
tag=1;
console.log("dh移入");
});
if(tag===1)
{

$(this).children('.dhbottom').css({height:230}).css({display:"block"}).show();

}
if(tag===3){
$(this).children('.dhbottom').animate({height:230},500).show();


}
},function(){
$(this).children('.dhbottom').animate({height: 0}, 500).hide();

});

});

Guess you like

Origin www.cnblogs.com/superSmall/p/11420271.html