JSFiddle - React, Tailwind, and code Playground

by interdream

HTML

<div id="secondDiv" style="width:100px; height:100px; background-color:#000; display:none"></div>

<input type="button" id="s2" value="Show with no duration" />

<div id="firstDiv" style="width:100px; height:100px; background-color:#000; display:none; margin-top:30px"></div>

<input type="button" id="s1" value="Show with duration" />

JavaScript

$("#s2").click(function() {
    $("#secondDiv").show(function() { 
        //Done
    });
});

$("#s1").click(function() {
    $("#firstDiv").show(0, function() { 
        //Done
    });
});