JSFiddle - React, Tailwind, and code Playground

by James

HTML

<input type="text" value="search" id="search" name="q"  />

JavaScript

$("#search").on("click", function() {
    if ($(this).val() == "search")
        $(this).val("")
});