JSFiddle - React, Tailwind, and code Playground
by bvotcode
HTML
<div id='m_wrapper'>
<ul id='menu'>
<li ><div>Item 1</div>
<div id='s0'>
<a href=#>Item 1.1</a>
<a href=#>Item 1.2</a>
<a href=#>Item 1.3</a>
</div>
</li>
</ul>
</div>
CSS
#menu
{
list-style:none;
}
#menu li
{
width:100px;
border:1px Solid #CCC;
text-align:Center;
cursor:pointer;
height:20px;
overflow:hidden;
}
#menu li div
{
border:1px Solid #CCC;
}
#s0
{
height:auto;
}
#s0 a
{
display:block;
}
JavaScript
$('#menu li').hover(
function(){
$(this).stop().animate({height: '100px'},1000,function(){});
$(this).find('div').show(600);
}//gets called upone mousehover
,
function(){
$(this).stop().animate({height: '20px'},1000,function(){});
} //gets called upone mouseout
); //hover ends