JSFiddle - React, Tailwind, and code Playground

by Vaibhav Katole

HTML

<div id="hide"><input type="text" name="id" value="1" /></div>
<div id="show" style="display: none;"><input type="text" name="id" value="3" /></div>

JavaScript

$('#hide').click(function(){
        if ($('#hide').is(':visible')) {  
            $("#hide").hide();
        };
        if ($('#show').is(':hidden')) {  
            $("#show").show();
        };
});