JSFiddle - React, Tailwind, and code Playground
HTML
<input id="Treatment" type="button" onclick="$();" value="Treatment" />
<div id="Div1">
</div>
<div id="Div2">
</div>
CSS
#Div1 {
background-color: black;
height: 100px;
margin: 100px;
width: 100px;
}
#Div2 {
background-color: green;
height: 100px;
margin: 100px;
width: 100px;
color:yellow;
}
JavaScript
$("#Treatment").on("click", function () {
var i = 1;
$('#Div2').show(000,function(){
$("#Div1").hide(000,function(){
//alert("Ok");
while (i<1100000) {
$('#Div2').text(i);
i++;
};
});
});
});