JSFiddle - React, Tailwind, and code Playground
by SmokeyPHP
HTML
<form method="post" id="product_create" action="">
<ul>
<li id="tab1" class="tab"><a href="#">Step 1</a></li>
<li id="tab2" class="tab"><a href="#">Step 2</a></li>
<li id="tab3" class="tab"><a href="#">Step 3</a></li>
<li id="tab4" class="tab"><a href="#">Step 4</a></li>
</ul>
</form>
JavaScript
$("#product_create").on("click",".tab",function() {
$("#product_create .tab").not($(this)).toggle();
});