use jquery chaining
This commit is contained in:
parent
57f1bd3cdf
commit
b896f5f75c
1 changed files with 9 additions and 6 deletions
|
|
@ -69,12 +69,15 @@ class WebkitGtkFormatter(TableFormatter):
|
|||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.each($("table"), function() {
|
||||
var $this = $(this);
|
||||
var thead = $('<thead>').append($this.find('tr:first'));
|
||||
$this.append(thead);
|
||||
$this.tablesorter();
|
||||
});
|
||||
var $table = $("table");
|
||||
$table
|
||||
.prepend(
|
||||
$("<thead>")
|
||||
.append(
|
||||
$table.find("tr:first")
|
||||
)
|
||||
)
|
||||
.tablesorter();
|
||||
});
|
||||
</script>
|
||||
%(table)s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue