◐ Shell
clean mode source ↗

Sticky headers with a fixed page header.

Hi, I'm just discovered this great library (and new to jquery generally), and am getting your library to do what I want, with 1 minor exception.

My webpage uses bootstrap, and my nav at the top is using navbar-fixed-top - resulting in the header banner staying when users scroll down the page.

If my page has a table, and I'm using your library to stick the header at the moment it is sticking behind my page navbar.

I couldnt figure out what setting I needed to make, so that:

  • stickyheader would leave the table header below the page navbar, instead of scrolling behind it.

(I was able to fix this by modifying the jquery.tablesorter.widget.js, around line 757, changing "top : 0" to "top : 57" (which is my required offset).)

  • scrolling the table would scroll at the bottom of the table header, not half way through it (after my offset).

(I was able to fix this by modifying the jquery.tablesorter.widget.js around line 843, modifying sTop to add 57 (which is my required offset).)

Both fixes are from commit version 5980d0e (which I got when I downloaded).

Ideally, this should be a config item or better still, it would be great if you can automatically figure out the required offset should be (and maybe the configure item might only require the class name that contains the position:fixed).

If there is a way of doing what I'm trying to achieve, then great - please let me know :)