JSFiddle - React, Tailwind, and code Playground

by mynameiswilson

HTML

<div id="container">
<div id="foo"></div>

    <button>slideToggle()</button>    
</div>

CSS

#container { width: 200px; height: 200px; margin: 100px auto; border: 1px solid #00f; position: relative;  } 
#foo { position: relative; top: -3px; border: 1px solid #f00; width: 50px; height: 50px; }
button { position: absolute; bottom: 0; right: 0 }

JavaScript

$('button').on("click",function() { $('#foo').slideToggle() });