JSFiddle - React, Tailwind, and code Playground
HTML
<div id="content">
<input type="text" data-empty-value="Test" />
<input tabIndex="1">
<input tabIndex="2">
<select tabIndex="3">
<option>select menu</option>
</select>
<div tabIndex="4">
a div
</div>
</div>
JavaScript
$( ":input[data-empty-value]" ).delegate( "*", "focus blur", function( event ) {
if (this.value == this.getAttribute("data-empty-value")) {
this.value = "t";
$(this).addClass("Focus");
}
});