-
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
tigger('update') even w/resort is not updating zebra #243
Comments
More debugging it seems like adding $.tablesorter.refreshWidgets($('#table'), true, false); returns TypeError: 'undefined' is not an object (evaluating 'c.widgets') So maybe it because I'm using id tables? Just using this for my notes. |
Figured it out, the table was hidden, I only showed it when I was done, since it was hidden all rows where so none got zebra. Sorry to waste your time. |
Hey The-Sin! No worries! I actually had a hard time with this too... see issue #224. Also, the refresh widgets function only takes a DOM element, not a jQuery object... I'll work on making either work in the next update. // parameters: table, doAll, dontapply
$.tablesorter.refreshWidgets( $('#table')[0], true, false ); |
good to know and thanks for this amazing pluggin, it just keeps getting better and better! I love it! |
My pleasure! :) |
I have lots of tables in my app using v2.7.9 and when I use ajax to populate my table in the ajax I run an update, well now I run lots and I can not get the zebra to update I have to physically click a sort to fix it.
ie:
in my $.ajax{ success:
I have as the last line
var resort = true;
$('#table').trigger('update', [resort]).trigger('appendCache').trigger('filterEnd');
It is doing the resort but the zebra is not working, looks at the results odd and even are not being applied to the table rows. I can just do this by hand by doing.
$('#table tbody tr:odd').addClass('odd');
$('#table tbody tr:even').addClass('even');
but this doesn't seem right. Is this a bug or have I not found the right event to trigger?
The text was updated successfully, but these errors were encountered: