JSFiddle - React, Tailwind, and code Playground

by Anthony Gonzales

HTML

<div>Show textbox
    <input type="radio" name="radio1" id="r1" value="Show" onClick="getResults()">Do nothing
    <input type="radio" name="radio1" id="r2" value="Nothing">
</div>
        <p>Wonderful textboxes:</p>
<div class="text">
    <p>Helpful hint</p>
    <p>This is a wonderful hint that you wouldn't have seen without clicking the radio button</p>
</div>

JavaScript

$(document).ready(function () {
    $(".text").hide();
    $("#r1").click(function () {
        $(".text").show();
    });
    $("#r2").click(function () {
        $(".text").hide();
    });
});