JSFiddle - React, Tailwind, and code Playground
by Milan Karagunović
HTML
<div id="startmenu" class="startmenu"></div>
<footer id="taskbar" class="taskbar">
<div id="startbutton">
<img src="start.png" alt="Start"/>
</div>
</footer>
CSS
#startmenu {
background: #666;
position: absolute;
display: none;
bottom: 25px;
left: 0;
color: gray;
width: 400px;
height: 650px;
}
#taskbar {
background: #444;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
#startbutton {
background: #ccc;
width: 50px;
height: 25px;
text-align: center;
cursor: pointer;
}
JavaScript
// DEMO 1
$(function() {
$('#startbutton').click(function() {
$('#startmenu').fadeIn('slow');
});
$('#startmenu').mouseleave(function() {
$(this).fadeOut('slow');
});
});
// DEMO 2
/*
$(function() {
$('#startmenu').css({ height: '0', display: 'block' });
$('#startbutton').click(function() {
$('#startmenu').stop().animate({ height: '650px' }, 600 );
});
$('#startmenu').mouseleave(function() {
$(this).stop().animate({ height: '0' }, 600 );
});
});
*/