JSFiddle - React, Tailwind, and code Playground

by deepak sisodiya

HTML

<button>Click to fade out boxes</button>
<br>
<br>
<div id="div1" style="width:80px;height:80px;background-color:red;"></div>
<br>
<div id="div2" style="width:80px;height:80px;background-color:green;"></div>
<br>
<div id="div3" style="width:80px;height:80px;background-color:blue;"></div>

JavaScript

// jquery fadeOut effect

$("button").click(function () {
    $("#div1").fadeOut();
    $("#div2").fadeOut("slow");
    $("#div3").fadeOut(3000);
});