use jquery chaining

This commit is contained in:
Christophe Benz 2010-09-27 14:26:55 +02:00
commit b896f5f75c

View file

@ -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