JSFiddle - React, Tailwind, and code Playground

HTML

<div id="div1">asfd</div>
<input type="button" id="btn1" value="Go" />

CSS

#div1 {
    display: none;
}

JavaScript

$("#btn1").one("click", function () {
    var current_item = $("#div1");
    current_item.css('margin-left', 0);
    current_item.animate({
        marginLeft: "20px",
        height: "toggle"
    }, 300, "swing");
});