Hi,
I found this great Tablesorter plugin for jQuery but I can't make it work with my PHP generated table. Here's the code:
<script type="text/javascript">
function table() {
$("#container").load("table.php?randval="+Math.random());
}
$(document).ready(function() {
table();
$("table").tablesorter();
});
</script>
Where #container is the div where the table will be and table is the name of the table. I get the table loaded but sorting function is not working.
It works if I put the table directly in html in the page.. but I don't see the point in having a static table for sorting.
Any help would be very appreciated.