jQuery table sorter is not working |
[eluser]zsela[/eluser]
Hi everybody! I would like to have your help in a question: I try to use jQuery Table Sorter on my site. Unfortunately it doesn't sort the columns of my table, I always get this error: Quote:$("#usertable").tablesorter is not a function I include the .js files in the header view. I call the function at the beginning of the manage_users view: Code: $(document).ready(function() { And finally I fill up the table with data later in the manage_users view: Code: echo '<table id="usertable" class="tablesorter">'; I can see the table, but no sorting is possible. Thanks for your answers in advance!
[eluser]Aken[/eluser]
That error means it does not recognize that function, which means you didn't load the Javascript files properly.
[eluser]CroNiX[/eluser]
Yep, check firebug to see if you are getting a 404 while loading your js file. Also, make sure you are loading jquery before loading any jquery plugins.
[eluser]zsela[/eluser]
You were right, the order was faulty: I loaded the plugin before jquery. It is such a primitive error, sorry to bother you with that. Thanks for the quick replies! |
Welcome Guest, Not a member yet? Register Sign In |