I am attempting to add a collapsible div inside of my bootstrap table. I am attempting to do this within my first column after the header titled "COLLAPSE HERE" I've wrapped the down icon in an anchor tag attempting to have the icon be the toggle of the collapsible. I then nested a <div></div> wrapping around the row of table that that i'd like to appear / hide on toggle. Currently, this has no effect on my table. I am using bootstraps method of collapsable but if this can be achieved in javascript that works fine.
Here is a code snippet of my code:
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/>
<table class="table table-hover">
<colgroup>
<col span="1" style="width: 116px;">
<col span="1" style="width: 116px;">
<col span="1" style="width: 116px;">
<col span="1" style="width: 116px;">
</colgroup>
<thead>
<tr>
<th scope="col">First</th>
<th scope="col">Second</th>
<th scope="col">Third</th>
<th scope="col">Four</th>
<th scope="col">TITLE</th>
</tr>
</thead>
<tbody class="text-18">
<tr>
<th scope="row" id="3digit">COLLAPSE HERE <a data-bs-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample"><i
class="fas fa-chevron-down"></i> </a></th>
<th scope="row"></th>
<th scope="row"></th>
<th scope="row"></th>
<th>Online Stores</th>
</tr>
</tbody>
<tbody>
<div class="collapse" id="collapseExample">
<tr>
<th scope="row">1</th>
<th scope="row">2</th>
<th scope="row">3</th>
<th scope="row">4</th>
<th>Retail</th>
</tr>
<tr>
<th scope="row">1</th>
<th scope="row">2</th>
<th scope="row">3 </th>
<th scope="row">4</th>
<th>Appointment</th>
</tr>
<tr>
<th scope="row">1</th>
<th scope="row">2</th>
<th scope="row">3</th>
<th scope="row">4</th>
<th>Orders</th>
</tr>
</div>
</tbody>
</table>
My expected outcome is to have everything under the first row under the "COLLAPSE HERE" title and icon to collapse the table.