tablesorter/docs/example-multiple-tbodies.html
2012-05-04 20:42:04 -05:00

101 lines
2.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery plugin: Tablesorter 2.0 - Sorting with Multiple Tbodies</title>
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<!-- Demo stuff -->
<link rel="stylesheet" href="css/jq.css">
<script src="js/chili/jquery.chili-2.2.js"></script>
<script src="js/chili/recipes.js"></script>
<script src="js/docs.js"></script>
<!-- Tablesorter: required -->
<link rel="stylesheet" href="../css/blue/style.css">
<script src="../js/jquery.tablesorter.js"></script>
<script id="js">$(function() {
$("table").tablesorter({
cssInfoBlock : "tablesorter-no-sort"
});
});</script>
</head>
<body>
<div id="banner">
<h1>table<em>sorter</em></h1>
<h2>Sorting with Multiple Tbodies</h2>
<h3>Flexible client-side table sorting</h3>
<a href="index.html">Back to documentation</a>
</div>
<div id="main">
<h1>Demo</h1>
<div id="demo"><table class="sortable">
<thead>
<tr><th>Name</th><th>A-head</th><th>B-head</th><th>C-head</th></tr>
</thead>
<tfoot>
<tr><th>Name</th><th>A-foot</th><th>B-foot</th><th>C-foot</th></tr>
</tfoot>
<tbody>
<tr><td>DDD</td><td>r1c1</td><td>r1c2</td><td>r1c3</td></tr>
<tr><td>AAA</td><td>r2c1</td><td>r2c2</td><td>r2c3</td></tr>
<tr><td>CCC</td><td>r3c1</td><td>r3c2</td><td>r3c3</td></tr>
<tr><td>BBB</td><td>r4c1</td><td>r4c2</td><td>r4c3</td></tr>
</tbody>
<!-- add "tablesorter-no-sort" class to skip sorting of this tbody -->
<tbody class="tablesorter-no-sort">
<tr><th colspan="4">summary info for the first group</th></tr>
<tr><th colspan="4">Another row referring to the first group</th></tr>
</tbody>
<tbody>
<tr><td>Zorro</td><td>r5c1</td><td>r5c2</td><td>r5c3</td></tr>
<tr><td>Caleb</td><td>r6c1</td><td>r6c2</td><td>r6c3</td></tr>
<tr><td>Momo</td><td>r7c1</td><td>r7c2</td><td>r7c3</td></tr>
<tr><td>Wolfie</td><td>r8c1</td><td>r8c2</td><td>r8c3</td></tr>
</tbody>
<tbody class="tablesorter-no-sort">
<tr><th colspan="4">summary info for the second group</th></tr>
</tbody>
<tbody>
<tr><td>Ulysses</td><td>r9c1</td><td>r9c2</td><td>r9c3</td></tr>
<tr><td>Penelope</td><td>r10c1</td><td>r10c2</td><td>r10c3</td></tr>
<tr><td>Edvald</td><td>r11c1</td><td>r11c2</td><td>r11c3</td></tr>
<tr><td>Jan</td><td>r12c1</td><td>r12c2</td><td>r12c3</td></tr>
</tbody>
<tbody class="tablesorter-no-sort">
<tr><th colspan="4">summary info for the last group</th></tr>
</tbody>
</table></div>
<h1>Javascript</h1>
<div id="javascript">
<pre class="js"></pre>
</div>
<h1>HTML</h1>
<div id="html">
<pre class="html"></pre>
</div>
<div class="next-up">
<hr />
Next up: <a href="example-option-digits.html">Dealing with digits! &rsaquo;&rsaquo;</a>
</div>
</div>
</body>
</html>