-
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
Sticky headers without caption #322
Comments
Add this CSS
That should do it. |
It works but the effect is really bad. The headers are duplicated at some times. |
it's all in CSS, try add a background to the table.containsStickyHeaders so it covers up and isn't transparent. This will hide everything that passes behind it. |
@Harmonium Hmm, I think you're right (demo), I'll just add an option to the sticky headers widget to include or not include the caption. Thanks @TheSin- for helping :) |
I know you are busy ATM so I'm just trying to help where I can till you return ;) Without code changes since that it out of my control ;) |
Hi, Thanks for the fix but I still have strange effects. As soon as the scroll passes the caption, the headers are duplicated. Take a look here : http://testersitefg.no-ip.info:8082/4DACTION/W_ListeDesJoueurs/ |
this seems like a very small over sight, I'll find the issue and post the patch for you in a few minutes, just need my morning java first ;) |
Okay here you go, works perfectly for me now. looks like outerHeight was required to get the true height, and I just simplified the check by adding it to the offset rather then twice in the compare. Hope this helps ya jquery.tablesorter.widgets.js line 1208 offset = $t.offset(),
cap = -(wo.stickyHeaders_includeCaption ? 0 : $t.find('caption').height()),
sTop = $win.scrollTop() + stickyOffset,
tableHt = $t.height() - ($stickyTable.height() + (tfoot.height() || 0)),
vis = (sTop > offset.top - cap) && (sTop < offset.top - cap + tableHt) ? 'visible' : 'hidden'; to offset = $t.offset(),
cap = (wo.stickyHeaders_includeCaption ? 0 : $t.find('caption').outerHeight(true)),
sTop = $win.scrollTop() + stickyOffset - cap,
tableHt = $t.height() - ($stickyTable.height() + (tfoot.height() || 0)),
vis = (sTop > offset.top) && (sTop < offset.top + tableHt) ? 'visible' : 'hidden'; |
Great ! It is working now ! Thanks to you ! Do you know when it will be officially released ? FG |
Mottie is on leave for a few months I'm sure he'll fix it once he is back, I'm just trying to help him out while he is away. From README.md and on the code page
|
if you put it all in a div you could use index(), or you coul djust check $(this).html() and parse it. I hate to go into more detail here since it has nothing to do with this ticket. If you'd like email me directly at gmail, thesin. |
This fix is now in git, so it will be included in the next release. |
Hi,
Is it possible to have sticky headers without caption ?
Regards,
FG
The text was updated successfully, but these errors were encountered: