JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
</head>
<body>
<div id="row">hi</div>
<div id="row" class="hidden 2">hi2</div>
<div id="row" class="hidden 3">hi3</div>
<button>Add Row</button>
</body>
</html>
CSS
#row{
width: 100%;
height: 20px;
background-color: yellow;
margin-bottom: 5px;
}
.hidden{
display: none;
}
JavaScript
$(document).ready(function(){
$(".hidden").hide();
var i = 2;
$("button").click(function () {
$("." + i).css("display","inherit");
$("." + i).show();
i++;
});
});