JSFiddle - React, Tailwind, and code Playground
HTML
<div id="widnow">
<div id="title_bar">
<center>
<div id="verti">↑</div>
</center>
<left>
<div id="hori">←</div>
</left>
</div>
<div id="box">
</div>
</div>
CSS
#widnow{
width:500px;
border:solid 1px;
}
#title_bar{
background: #FEFEFE;
height: 25px;
width: 100%;
}
#hori{
border:solid 1px;
width: 25px;
height: 25px;
float:right;
cursor:pointer;
}
#verti{
border:solid 1px;
width: 25px;
height: 25px;
float:right;
cursor:pointer;
}
#box{
height: 250px;
background: #999;
}
JavaScript
$("#verti").click(function(){
if($(this).html() == "↑"){
$(this).html("↓");
}
else{
$(this).html("↑");
}
$('#box').animate({height: 'toggle'});
});
$("#hori").click(function(){
if($(this).html() == "←"){
$(this).html("→");
}
else{
$(this).html("←");
}
$('#box').animate({width: 'toggle'});
});