-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reloading table #199
Comments
It sounds like maybe you're removing the TRs in the head? Because the parsers variable shouldn't be undefined. In the next update, I'll add a check to prevent that error, but I'd need to see the code to tell you what's going on. |
I think i might have figured it out. I was loading the rows via append all at once, and they were wrapped in a tag. however, when i was clearing them out, I only cleared out the so i ended up with multiple tags in the table, one empty the second with the rows. never a good thing ;) |
Did you know there is a built-in function to clear the tbody? $.tablesorter.clearTableBody( table ); It will clear all tbodies that don't have the |
Okay, I admit, i'm doing some crazy stuff with my page. However, this is what's happening.
I have a table on a tab, that I load some data into via an ajax call. I take all the json, build the body, and load it into the table.
if the user changes tabs, then returns to the initial one, I remove all the TRs and reload the table.
What i'm seeing is that the initial sorting works find from the empty table. However, when i remove the rows and reload the data and perform the initial default sort on it, I get an error in the JS:
Uncaught TypeError: Cannot read property '0' of undefined jquery.tablesorter.js:239
This is the line it pukes on:
v = parsers[j].format(t, table, c[0].cells[j], j);
thoughts? I'll try to build a working example
The text was updated successfully, but these errors were encountered: