I have a table that I load via a jQuery load command. in the callback of the load function I initiate the tablesorter plugin. For some reason then the table only sorts descending not ascending. Even weirder, if I hold shift it will toggle correctly between asc and desc? Any idea what's going on here?
table.php
<table id="xyz">
<thead>
<tr>
<th>hi</th>
</tr>
</thead>
<tbody>
<tr>
<td>a</td>
</tr>
<tr>
<td>b</td>
</tr>
<tr>
<td>c</td>
</tr>
</tbody>
</table>
jquery
$("#myDiv").load("table.php", function() {
$("#xyz").tablesorter();
});
if I don't load the table via ajax then the tablesorter functions as expected.
.tablesorter()
anywhere else in your file? you may be double-binding... – Fleabane