JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="create-login-button" role="button">
<div id="create-login-group" class="hideMe removeMe">
Some text is here
</div>
<br>
test
CSS
.hideMe {
opacity: 0;
}
.removeMe {
display:none;
}
#create-login-group {
border: 2px solid #000;
height: 100px;
width: 150px;
}
JavaScript
$( "#create-login-button" ).change(function() {
$('#create-login-group').toggleClass("hideMe", 1000, "easeInOutQuad").toggleClass("removeMe");
});