![]() |
jQuery table sorter is not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: jQuery table sorter is not working (/showthread.php?tid=49070) |
jQuery table sorter is not working - El Forum - 02-07-2012 [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! jQuery table sorter is not working - El Forum - 02-07-2012 [eluser]Aken[/eluser] That error means it does not recognize that function, which means you didn't load the Javascript files properly. jQuery table sorter is not working - El Forum - 02-07-2012 [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. jQuery table sorter is not working - El Forum - 02-07-2012 [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! |