JSFiddle - React, Tailwind, and code Playground
by vonDy2791
HTML
<input id="invite" type="button" value="Invite" />
<span id="pending">Pending</span>
<input id="cancel" type="button" value="Cancel" />
CSS
#pending{
background-color:green;
color:white;
padding: 3px;
}
JavaScript
$('#pending').hide();
$('#cancel').hide();
$('#invite').on('click', function () {
$(this).hide('fast');
$('#pending').show('fast');
$('#cancel').show('fast');
});
$('#cancel').on('click', function () {
$(this).hide('fast');
$('#pending').hide('fast');
$('#invite').show('fast');
});