• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 997
  • Last Modified:

Use jQuery tablesorter on dynamically created table

I use the jQuery tablesorter plugin from http://tablesorter.com/

On static tables it works fine, using $("#myTable").tablesorter(); in the $(document).ready(function()

How can I make tablesorter work on the table when it's dynamically created?
I use a ajax call to create different tables.

I've looked at the jQuery on and bind events, but can't get the syntax right.
1 Solution
You simply need to add it to the callback of whatever function is running to create the dynamic content, if you post what you have we can have a look.
fmsolAuthor Commented:
Of course! Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now