JSFiddle - React, Tailwind, and code Playground

by Michele Marcucci

HTML

<input type="submit" value="hide" id="btnshowhide" />

JavaScript

$(document).ready(function () {
    $('#btnshowhide').click(function () {
        if ($(this).val() == "hide") {
            $(this).val("show");
        } else {
            $(this).val("hide");
        }
    });
});