Skip to content
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

How to perform action after the initial sorting of the table completes #1086

Closed
darkred opened this issue Nov 17, 2015 · 3 comments
Closed

Comments

@darkred
Copy link

darkred commented Nov 17, 2015

I have an HTML table which is sorted successfully using the tablesorter plugin.
It's sorted initially by columns 3, 0, and 2.
Here is the code:

$('#tbl').tablesorter ( {
        sortList : [[3,0],[1,0],[2,0]] 
    } );

I want to apply some CSS to that table after the initial multi-column sorting completes.

Is it possible?
(I have found thesortEnd hook (link) but unfortunately it only runs when you click on a column heading to sort by. It doesn't work on after the initial sorting completes)

@Mottie
Copy link
Owner

Mottie commented Nov 17, 2015

Hi @darkred!

You can bind to the tablesorter-initialized event, or even use the initialized callback function to do whatever you want.

@Mottie
Copy link
Owner

Mottie commented Nov 17, 2015

Oh, and those only work on my fork of tablesorter, not the original (v2.0.5).

@darkred
Copy link
Author

darkred commented Nov 17, 2015

Thank you very much for the quick answer!

@darkred darkred closed this as completed Nov 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants