Perl,
You might want to check out
http://rikrikrik.com/jquery/pager/. It is a jquery plugin that basically lets tabs look like pagination for individual divs (sections).
Also, here is some code I used to create a non-editable, yet sortable, table in JQuery:
Template (in <head>)
<style type="text/css">@import "[(base_url)]assets/js/default.css";</style>
<script type="text/javascript" src="[(base_url)]assets/js/jquery.js"></script>
<script type="text/javascript" src="[(base_url)]assets/js/jquery.tablesorter.js"></script>
<script>
$(function() {
$("#styling-custom-highlighting").tableSorter({
sortColumn: '1', // Integer or String of the name of the column to sort by.
sortClassAsc: 'headerSortUp', // Class name for ascending sorting action to header
sortClassDesc: 'headerSortDown', // Class name for descending sorting action to header
highlightClass: 'highlight', // class name for sort column highlighting.
stripingRowClass: ['even','odd'], // Class names for striping supplyed as a array.
headerClass: 'header' // Class name for headers (th's)
});
});
</script>
MODx Document
[[show_table]] <!-- Call Snippet -->
<table id="styling-custom-highlighting" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>etc.</th>
</tr>
</thead>
[+show_table_results+] <!-- Call placeholder -->
</tbody>
</table>
Snippet - named [[show_table]]
$ds = $modx->db->select('*', 'CHOOSE YOUR TABLE', '"', '', '');
if ($modx->db->getRecordCount($ds) > 0) {
while($row = $modx->db->getRow($ds)) {
$key = '';
$value = '';
$chunk_tpl = 'show_table_row'; // name of chunk
$chunkTpl = $modx->getChunk($chunk_tpl);
foreach($row as $key => $value) {
$chunkTpl = str_replace('[+' . $key . '+]', $value, $chunkTpl);
}
$createList .= $chunkTpl;
}
$placeholder_tpl = 'show_table_results'; // name of placeholder
$modx->setPlaceHolder($placeholder_tpl, $createList);
} else {
echo "No results found.";
}
Chunk - named {{show_table_row}}
(replace table_column1 with the names of your database columns
<tr>
<td>[+table_column1+]</td>
<td>[+table_column2+]</td>
<td>[+etc+]</td>
</tr>
This code is almost completely from a function in Uncle’s ppp snippet. The Jscript is from
http://motherrussia.polyester.se/jquery-plugins/tablesorter/
Hope it can be of use to you.
Chuck