April 18, 2011

jQuery TableSorter "o is undefined" problem

If you use jQuery TableSorter and see the "o is undefined" problem, it is the probably the case that you are using "<td>" inside the <thead> section instead of <th>. Use <th> and you will be good.

13 comments:

  1. Thanks for taking the time to post this. Sho'nuff, that was my issue.

    ReplyDelete
  2. i did it but it doesn't solve my problem.

    ReplyDelete
  3. Thank you! Fixed my issue.

    ReplyDelete
  4. Thanks, that solved it!

    ReplyDelete
  5. That pointed me in the right direction but my problem was a missing tr. I had td as direct children of a thead. It would be a lot more user-friendly if the tablesorter would detect and alert messages with this problem.

    No descendent of thead should be a td.
    There must be 1 tr which is a direct child of the thead.

    XHTML validation of the page and its table would point out a lot of similar problems.

    ReplyDelete
  6. I just had this problem, i was trying to sort on the last column in a table. I managed to solve it by adding another hidden column to the table. I guess the sorter looks to the next column if you only specify one column to sort by ([5,0]) for example.

    ReplyDelete
  7. Tiebing, thank you!

    ReplyDelete
  8. Thanks for taking the time to post this! :)

    ReplyDelete
  9. Thanks so much! Your simple tip helped me out tremendously!

    ReplyDelete
  10. Thanks worked!!

    ReplyDelete
  11. Thanks! Was my problem...

    ReplyDelete