JSFiddle - React, Tailwind, and code Playground
HTML
<div class="down">
<div id="showb">
<a href="#" id="menu-show" class="down"> <div id="menu" style="display: block;">
<div class="menu-main">Menu Contents</div>
<div class="menu-bottom"></div>
</div></a>
</div><!-- end show button -->
<div id="hideb">
<a href="#" id="menu-hide" class="up"></a>
</div><!--end hide button -->
</div>
CSS
.down {
background: url("http://www.twinkletwinklelittleone.com/source/Twinkle%20New%20Design/imgs/category.png") repeat scroll 0 0 transparent;
height: 17px;
position: absolute;
width: 177px;
}
.up {
background: url("http://www.twinkletwinklelittleone.com/source/Twinkle%20New%20Design/imgs/category.png") repeat scroll center bottom transparent;
height: 17px;
position: absolute;
width: 177px;
}
#menu {
display: none;
position: absolute;
top: 17px;
width: 634px;
z-index: 100000;
}
.menu-main {
background: url("http://www.twinkletwinklelittleone.com/source/Twinkle%20New%20Design/imgs/menu-bg.png") repeat scroll 0 0 transparent;
padding: 5px;
width: 624px;
}
.menu-bottom {
background: url("http://www.twinkletwinklelittleone.com/source/Twinkle%20New%20Design/imgs/menu-bottom.png") repeat scroll 0 0 transparent;
height: 13px;
width: 634px;
}
JavaScript
jQuery(document).ready(function() {
// hides the menu as soon as the DOM is ready
// (a little sooner than page load)
jQuery('#menu').hide();
jQuery('#hideb').hide();
// shows the menu on clicking the noted link
jQuery('a#menu-show').mouseover(function() {
//jQuery('#showb').hide();
//jQuery('#hideb').show();
jQuery('a#menu-show').toggleClass("down up");
jQuery('#menu').slideDown();
return false;
});
// hides the menu on clicking the noted link
jQuery('a#menu-show').mouseout(function() {
jQuery('a#menu-show').toggleClass("down up");
jQuery('#menu').slideUp();
return false;
});
});