Quantcast
Viewing all articles
Browse latest Browse all 82114

th in tbody for subtotals messes up sorting

Hi! I have a table with subtotal rows, th cells in tbody. Example:
<table>
<thead>
<th>Group</th>
<th>Name</th>
<th>Some value</th>
</thead>
<tbody>
<tr>
<td>Admins</td>
<td>John Doe</td>
<td>2</td>
</tr>
<tr>
<td>Admins</td>
<td>Jane Smith</td>
<td>3</td>
</tr>
<tr>
<th>Admins</th>
<th>Total</th>
<th>5</th>
</tr>
<tr>
<td>Users</td>
<td>Joan Doe</td>
<td>4</td>
</tr>
<tr>
<td>Users</td>
<td>Jack Smith</td>
<td>1</td>
</tr>
<tr>
<th>Users</th>
<th>Total</th>
<th>5</th>
</tr>
</tbody>
<tfoot>
<th colsapn="2">Grand total</th>
<th>10</th>
</tfoot>
</table>
If i sort on group column the totals should be on the groups bottom. How can i assure this?

Viewing all articles
Browse latest Browse all 82114

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>