Menu that comes above area when clicked
by jshacker
HTML
<div class='area'></div>
<div class='menu'></div>
<div class='button'>menu</div>
CSS
body {
margin: 0;
}
.area {
min-height: 800px;
min-width: 600px;
height: 100%;
width: 100%;
background-color: #ddd;
}
.menu{
min-height: 400px;
min-width: 540px;
height: 100%;
width: 90%;
background-color: #eee;
position: fixed;
top: 0;
display: none;
}
.button{
height: 20px;
min-width: 20px;
padding: 10px;
background-color: black;
color: white;
position: fixed;
top: 10px;
left: 10px;
}
JavaScript
$(function(){
$('.button').on('click', function(){
$('.menu').toggle();
});
});