I’m putting some finishing touches on a new script I wrote, here. One of the last things I need to do is to get some Javascript I can use to make sure that when the user scrolls down the table, they can still see the first row (or whatever I put in a DIV at or near the top of each column). Can anyone please help for this?
That look perfect, thanks! However, I’m having some trouble using it. I’m using xenForo, which should already have jquery installed. I used the following code, and nothing happened.
Hmm. Okay, still having some issues. The script “works” but I’m having issues with the end result, because the elements I’m trying to stick are not fixed dimensions. See here. Please help!
I didn’t said that an absolute path was necessary. I said that in your markup the link to the script file was pointing to a path in the root of the site and the file wasn’t hosted there.
But, now the link and the file are OK.
Hmm. The first did not work; the sticky table expanded to full size and also did not stay in the same place.
The second one is closer, but (1) there are overlap problems before scroll and (2) the width/height is only correct when the window is full sized. Please see http://wearabletechforums.com/compare/specs/
As I said, for option 2, to fix the width/height issues in others windows sizes create media-queries rules for the .is-sticky table selector width according the site’s breakpoints.
Oh sorry. Overlooked that part. Ok
Not sure how that would solve the problem though, because the table width can’t scale down in steps; it scales down pixel by pixel. Is there something I’m missing?
I think I have it all figured out except for one bug: On small devices such as the iPhone, the table sometimes extends beyond the width of the “page” itself. This is not normally a problem, as one can simply scroll horizontally to see the rest of the table beyond the boundaries of the page. However, since this JS bases its calculations on the page width, the sticky element does not scroll horizontally correctly. It’s difficult to explain, but please take a look on a mobile device, held vertically. Thank you in advance.