I'm trying to create a list of menu that when you hover on each it will show the other content. It is now working though yet every time you hover on each item it will create a space on the other list item.
Here's the sample code.
<ul class="test111">
<li><span class="testCont">Another</span><a href="#" class="testmenu">Menu 1</a></li>
<li><span class="testCont">Another1</span><a href="#" class="testmenu">Menu 2</a></li>
</ul>
CSS
.test111{
position: fixed;
right:0;
margin-right:0;
}
.test111 li{
margin-bottom: 10px;
list-style: none;
height:36px;
display: block;
}
.test111 li .testCont{
background:#0f0;
width:100px;
float:left;
height: 100%;
}
.test111 li a{
background:#0ff;
width:50px;
float:left;
height: 100%;
}
JS
$('.testCont').hide();
$('.test111 li').mouseover(function(){
$('.test111 li').removeClass('hoverME');
$(this).addClass('hoverME');
$('.hoverME .testCont').show();
});
$('.test111 li').mouseout(function(){
$('.testCont').hide();
});
Thank you so much