JSFiddle - React, Tailwind, and code Playground
HTML
<div id="titlebar">
<p> Activities </p>
<blink style="display: block; text-align: center; margin-top: -1.4em;"> 12:00 </blink>
<p style="text-align: right; margin-top: -1.4em;"> Jasper St. Pierre </p>
</div>
<div id="accordion">
<div class="decoration"> Firefox </div>
<div class="window"> Firefox Window Contents </div>
<div class="decoration selected"> File Manager </div>
<div class="window selected"> File Manager Window Contents </div>
</div>
CSS
html, body, p {
margin: 0;
padding: 0;
border: 0;
}
html, body {
height: 100%;
font-family: sans;
font-weight: bold;
}
#titlebar {
background-color: black;
height: 1.4em;
line-height: 1.4;
padding: .24em 1em;
color: #ccc;
}
.decoration {
cursor: pointer;
color: #222;
text-shadow: 1px 1px 0px white;
border-bottom: 1px solid white;
background-color: #e4e4e4;
background-image: -moz-linear-gradient(#efefef 0%, #e4e4e4 100%);
height: 2em;
line-height: 2;
text-align: center;
}
.window {
display: block;
text-align: center;
}
#accordion {
border-radius: 15px 15px 0 0;
position: absolute;
top: 1.84em;
bottom: 0px;
width: 100%;
}
JavaScript
var inWindowSelect = false;
$("#titlebar").mouseenter(function() {
inWindowSelect = true;
$(".decoration").slideDown("fast").click(function() {
if (!inWindowSelect) return;
$(".decoration, .window").removeClass("selected");
$([this, $(this).next()[0]]).addClass("selected").detach().appendTo("#accordion").slideDown();
$(".decoration:not(.selected), .window:not(.selected)").slideUp();
});
});
$(".decoration:not(.selected), .window:not(.selected)").hide();