JSFiddle - React, Tailwind, and code Playground
by tea4two
HTML
<div id="fade1"></div>
CSS
#fade1 {
display: none;
width: 100px; height: 100px;
background-color: red;
}
JavaScript
$(function() {
var _fade1 = $('#fade1');
_fade1.fadeIn(4000);
_fade1.on('click',function(e) {
if( _fade1.css('opacity') !== '1' ) {
console.log('not yet!');
} else {
console.log('Yes its visible!');
}
e.preventDefault();
});
});