JSFiddle - React, Tailwind, and code Playground
by Justin
HTML
<div id="slideMe"> Slide me out, baby </div>
CSS
#slideMe { background-color:black; color:#eee; width:100%; position:absolute; left:-90%; height:400px;}
JavaScript
clikame = false;
$('#slideMe').click(function(){
if(clikame == false) {
$(this).animate({left: "+=400", height:"400"}, 500);
clikame = true;
} else {
$(this).animate({left: "-400" },200);
clikame = false;
}
})