"bootstrap accordion table , accordion table bootstrap"
Bootstrap 4.1.1 Snippet by sanboots

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
<table class="custom-table">
<thead>
<tr>
<th>Page Name</th>
<th>Light House Report Filename</th>
<th>Page Id</th>
<th>Sess Id</th>
<th>Child Id</th>
<th>Gen Id</th>
<th>Group Name</th>
<th>Host Id</th>
<th>Browser Type</th>
<th>Performance Score</th>
<th>Accessibility Score</th>
<th>PWA Score</th>
<th>Best Practice Score</th>
<th>SEO Score</th>
<th>Frst Contntful Paint</th>
<th>Frst Meaningful Paint</th>
<th>TTI</th>
<th>Speed Index</th>
<th>Frst CPU Idle</th>
<th>Estimated Input Latency</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="20" class="page-header"><button type="button" class="tbtn"><i class="fa fa-plus-circle fa-minus-circle"></i> · P_index</button> </td>
</tr>
<tr class="toggler toggler1">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
.custom-table{border-collapse:collapse;width:100%;border:solid 1px #c0c0c0;font-family:open sans;font-size:11px}
.custom-table th,.custom-table td{text-align:left;padding:8px;border:solid 1px #c0c0c0}
.custom-table th{color:#000080}
.custom-table tr:nth-child(odd){background-color:#f7f7ff}
.custom-table>thead>tr{background-color:#dde8f7!important}
.tbtn{border:0;outline:0;background-color:transparent;font-size:13px;cursor:pointer}
.toggler{display:none}
.toggler1{display:table-row;}
.custom-table a{color: #0033cc;}
.custom-table a:hover{color: #f00;}
.page-header{background-color: #eee;}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
$(document).ready(function () {
$(".tbtn").click(function () {
$(this).parents(".custom-table").find(".toggler1").removeClass("toggler1");
$(this).parents("tbody").find(".toggler").addClass("toggler1");
$(this).parents(".custom-table").find(".fa-minus-circle").removeClass("fa-minus-circle");
$(this).parents("tbody").find(".fa-plus-circle").addClass("fa-minus-circle");
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: