JSFiddle - React, Tailwind, and code Playground
by smendola
HTML
<div id="car2" style="display:none;background:red;">VISIBLE</div>
<input type="button" id="show" value="show">
<input type="button" id="hide" value="hide">
<input type="button" id="check" value="check">
JavaScript
$("#show").click(function() {
$("#car2").show();
});
$("#hide").click(function() {
$("#car2").hide();
});
$("#check").click(function test() {
if ($('#car2').is(':hidden')) {
alert('car 2 is hidden');
} else {
alert('car 2 is NOT hidden');
}
})