JSFiddle - React, Tailwind, and code Playground

by tymeJV

HTML

<div id="panel">Im a panel!</div>
<input type="button" class="btn-slide" value="click me!"/>

CSS

.active {
    color: red;
}

JavaScript

$(".btn-slide").click(function(){
       $("#panel").slideToggle("slow");
       $(this).toggleClass("active"); return false;
});

$(".btn-slide").trigger("click");