Hi there! I have a question about adding collapsible elements to an HTML table. Below is my code:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d5b7babaa1a6a1a7b4a595e1fbe3fbe7">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fc968d89998e85bccfd2c9d2cd">[email protected]</a>/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e88a87879c9b9c9a8998a8dcc6dec6da">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Type</th>
<th class="d-none d-md-table-cell" scope="col">Old Permalink</th>
<th class="d-none d-md-table-cell" scope="col">New Permalink</th>
<th class="text-center d-none d-md-table-cell" scope="col">Remove</th>
</tr>
</thead>
<tbody>
<!-- Table content goes here -->
</tbody>
</table>
I would like to know how I can make it so that clicking on the "301" row collapses the rest of the table. Here are some visual examples:
When the highlighted 301 row is pressed, all other data should collapse.
https://i.sstatic.net/rGngR.png
After collapsing the data by pressing the 301 row:
https://i.sstatic.net/0JyaR.png
Thank you for your help! Please provide guidance on using Bootstrap CSS and JS files (included in the Bootstrap 4.0.0 ZIP).