JSFiddle - React, Tailwind, and code Playground

HTML

<body>


<div class="container_12 header"> 
  <div class="grid_3"> 
    <img src="/library/assets/images/hccc_logo.png" class="logo" alt="domain logo" />
  </div>
</div> 
<div class="container_12">

<table class="data">
<thead>
<tr>
  <th>Last</th>
  <th>First</th>
  <th>Birthday</th>
  <th>ID</th>
  <th>Degree</th>
  <th>IA</th>
  <th>NM</th>
  <th>Felon</th>
  <th>Dis</th>
  <th>Prob</th>
  <th>H#</th>
  <th>Direct to</th>
  <th>Info</th>
</tr>
    </thead>

<tr>
  <td><a href="#" id="8" class="mini-view">Smith</a></td>  
  <td>Brad</td>  
  <td>1980-12-30</td>  
  <td>746239292</td>  
  <td><select name="degree_type" id="degree_type">
<option value="" selected="selected"></option>
<option value="AA">AA</option>
<option value="AS">AS</option>
<option value="AAS">AAS</option>
<option value="Certificate">Certificate</option>
</select></td>

  <td><input type="checkbox" name="internet_student" value="1" checked="checked"  /></td>

  <td><input type="checkbox" name="non_matriculated_student" value="1" checked="checked"  /></td>

  <td><input type="checkbox" name="felony" value="1" checked="checked"  /></td>

  <td><input type="checkbox" name="dismissed" value="1" checked="checked" 1 /></td>
  
  <td><input type="checkbox" name="probation" value="1" id="probation" /></td>

  <td><input type="text" name="h_number" value="" id="h_number" /></td>

  <td><select name="office_direct_to" id="major_id">
<option value="" selected="selected"></option>
<option value="2">Advisement Center</option>
<option value="4">Bus. Health Science Tech Div</option>
<option value="6">Campus Safety</option>
<option value="3">Financial Aid</option>
<option value="5">Humanities/Social Science Div</option>
<option value="1">Registrar</option>
</select></td>

  <td><a href="https://app.domain.edu/request-to-return/index.php/admin/view/8"  id="8" class="mini-view">more</a></td> 
</tr>

<tbody id="row8" style="display:none;"></tbody>

<tr>
  <td><a href="#" id="9" class="mini-view">Chuck</a>
 ...

JavaScript

$('.mini-view').click(function(e) {
    e.preventDefault();
    var id = this.id;
    if ($("#row" + id ).next('#open'+id).length > 0) {   // <-- check if there is a next row
        console.log('greater than 0');       
        $("#row" + id ).next('#open'+id).slideToggle(); // <-- if there is just toggle next row
    } else {
        $("#row" + id + "").after("<tr class='more-info' id='open" + id + "'><td colspan='13' class='mbg'>testing</td></tr>");
        // else add new row
    }
});