JSFiddle - React, Tailwind, and code Playground

HTML

<button id="ctl00_ctl24_g_5f3fedca_19f7_4bc3_b84e_efbef0c48a33_ctl00_btnAddFoapalRow" type="button">+</button>
<table border="2">
    						<tr>
    							<td width="88px" style="text-align:center;">
<span class="dplatypus-webform-field-label">Index</span>
</td>
    							<td width="88px" style="text-align:center;">
<span class="dplatypus-webform-field-label" style="text-align:center;">Fund</span>
</td>
<td width="88px" style="text-align:center;">
<span class="dplatypus-webform-field-label" style="text-align:center;">Organization</span></td>
    							<td width="88px" style="text-align:center;">
<span class="dplatypus-webform-field-label" style="text-align:center;">Account</span>
</td>
    							<td width="88px" style="text-align:center;">
<span class="dplatypus-webform-field-label" style="text-align:center;">Activity</span>
</td>

<td width="88px" style="text-align:center;">
<span class="dplatypus-webform-field-label" style="text-align:center;">Amount</span></td>
    						</tr>
    						<tr>
    							<td width="88px">

<input name="ctl00$ctl24$g_5f3fedca_19f7_4bc3_b84e_efbef0c48a33$ctl00$ctl130" type="text" class="dplatypus-webform-field-input" style="width:88px;" />
</td>
    							<td width="88px">
<input name="ctl00$ctl24$g_5f3fedca_19f7_4bc3_b84e_efbef0c48a33$ctl00$ctl132" type="text" class="dplatypus-webform-field-input" style="width:88px;" />
</td>
<td width="88px">
<input name="ctl00$ctl24$g_5f3fedca_19f7_4bc3_b84e_efbef0c48a33$ctl00$ctl134" type="text" class="dplatypus-webform-field-input" style="width:88px;" />
</td>
    							<td width="88px">
<input name="ctl00$ctl24$g_5f3fedca_19f7_4bc3_b84e_efbef0c48a33$ctl00$ctl136" type="text" class="dplatypus-webform-field-input" style="width:88px;" />
</td>
<td width="88px">
<input name="ctl00$ctl24$g_5f3fedca_19f7_4bc3_b84e_efbef0c48a33$ctl00$ctl138" type="text" class="dplatypus-webform-field-input" style="width:88px;" />
</td>
    							<td width="88px">
<input...

CSS

.hide-row {display: none;}

JavaScript

$(document).on("click", '[id$=btnAddFoapalRow]', function (e) {
       if ($('[id$=foapalrow3]').hasClass("hide-row")) {
       $('[id$=foapalrow3]').removeClass("hide-row");
} else {
       $('[id$=foapalrow4]').removeClass("hide-row");
}
    });