-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to make more than 1 row sticky? #52
Comments
The way the widget works now, it only makes one row sticky because I was trying to prevent it from interfering with the other widgets, like the filter. I'll look into adding more sticky headers when I have some time. |
Hi megatom! Check out the latest version (2.1.16) which now works with multiple sticky rows. I've also updated the sticky header demo. |
Hello, |
Hi. are you putting If not, could you share a bit more information... like the header HTML, initialization settings, and if it is occurring in all browsers or just one. Thanks. |
Hmm, ok try doing this, I think it'll make the sticky header widget work with $('table').tablesorter({
// get both TH's and TD's from the table header
selectorHeaders: 'thead th, thead td',
widgets: [ 'zebra', 'stickyHeaders' ]
}); |
Hi, |
Then I need some code. |
OK, for example on this site: |
Sorry, i have to downgrade the site to 2.1.15, because none of my scripts are working with 2.1.16 and this site is no test page ;) |
Ok, try the 2.1.17 update. It works. |
2.1.17 seeems to work with 2 sticky rows, but may have some problems with filter :( |
If I replace this code in the $(".sortable").tablesorter({ widgets: [ 'stickyHeaders' ] });
if($(".sortableFilter").length){
// Update the list of widgets to apply to the table (add or remove)
$(".sortableFilter").data("tablesorter").widgets = ['filter'];
// This method applies the widget - no need to keep updating
$('.sortableFilter').trigger('applyWidgets');
} with this: $(".sortable").tablesorter({
selectorHeaders: 'thead th, thead td',
widgets: [ 'filter', 'stickyHeaders' ]
}); then add this css: .sortable thead tr {
background: #fff;
} Once that is done, the filter widget does add a few extra inputs... so I will need to modify the sticky and filter widgets. Give me a few minutes. |
I kept the same version number and just updated the widget.js file. |
Great job! Works fine now for me. |
I've added the |
I want make more than 1 row of my table sticky.
If i put 3 TR in the THEAD with TH inside tablesorter just makes the last row sticky.
If i put 1 TR with TH and 2 TR with TD it makes only the 1 with TH sticky.
But how can I make all of my TR in THEAD sticky?
The text was updated successfully, but these errors were encountered: