JSFiddle - React, Tailwind, and code Playground

by Town

HTML

<input id="textbox" type="text" /> <span id="notify">(!)</span>
<button id="btn">Go</button>

CSS

button { display: block; }
#notify { display: none; color: red; }

JavaScript

$("#textbox").focusout(function() {
    if (this.value.length === 0) {
        $('#notify').show();
    }
    else {
        $('#notify').hide();
    }
});

$("#btn").click(function() {
    alert("clicked");
});