Mysql PHP generated table: doesn't work with Tablesorter

Posted by echedey lorenzo on Stack Overflow See other posts from Stack Overflow or by echedey lorenzo
Published on 2010-03-14T03:09:16Z Indexed on 2010/03/14 3:15 UTC
Read the original article Hit count: 546

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php