JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" id="handle" class="down">v</a>
<div id="dialog" class="open">
<p>Lorem Ipsem...</p>
</div>
CSS
a#handle {
display: block;
float: left;
font-size: 3em;
color: gray;
text-decoration: none;
width: 1em;
height: 1em;
line-height: 1em;
text-align: center;
font-family: sans-serif;
}
a:active, a:focus {
outline-style: none;
}
a.up {
-webkit-transform: rotate(-180deg);
-moz-transform: rotate(-180deg);
-ms-transform: rotate(-180deg);
-o-transform: rotate(-180deg);
transform: rotate(-180deg);
}
div#dialog {
background-color: #eef;
border-radius: 5px;
float: left;
padding: 2em;
}
JavaScript
$(document).ready(function () {
$("#handle").click(function (e) {
e.preventDefault();("#handle").click(function (e)
$(this).toggleClass("up down");
$("#dialog").slideToggle();
});
});