JSFiddle - React, Tailwind, and code Playground

by mgibsonbr

HTML

<input value="9" />
<button>Explode</button>
<div id="container">
    <div id="teste"></div>
</div>

CSS

#teste {
    width: 200px;
    height: 200px;
    background: red;
}

#container {
    width:210px;
    height:210px;
    background: blue;
}

JavaScript

$("button").click(function() {
    $("#teste").toggle("explode", {
        pieces: parseInt($("input").val(), 10)
    }, 2000);
});