JSFiddle - React, Tailwind, and code Playground

HTML

<div>  
        <a href="#" class="show">Show</a>
</div>
  <div class="test" id="1">TEST1<br><input type="text" value="1"/></div>
  <div class="test" id="2"><input type="text" value="2"/></div>
  <div class="test" id="3"><input type="text" value="3"/></div>
  <div class="test" id="4"><input type="text" value="1"/></div>

JavaScript

$(".test").hide();
    $(".show").click(function () {        

        $(this).parent().siblings("div:not(:visible)").first().show();
        evenpreventDefault();
    });