4 ms·
I looked at your code and it's written in typescript, but I have a thing written in jQuery whitch floats the table headers that your website really needs. You c
by mkoryak 5y ago
I looked at your code and it's written in typescript, but I have a thing written in jQuery whitch floats the table headers that your website really needs. You can probably use position:fixed too.
https://github.com/mkoryak/floatThead https://github.com/mkoryak/floatThead
- cxr 5y agoFor anyone who wants to implement this, please _don't_ implement it like the GIF. <https://github.com/mkoryak/floatThead/blob/master/README.md https://github.com/mkoryak/floatThead/blob/master/README.md> Instead, do what mobile web browsers do, where the header is automatically revealed and overlaid onto the content when scrolling up. On desktop, you can make it so the headers are also revealed when mousing around over the relevant data. But indiscriminately reducing the size of the viewport by going sticky is incredibly annoying.
- mkoryak 5y agoTo be fair, the thing you linked to was never made for mobile. On desktop reducing the size of the viewport isn't generally a huge problem.
- cxr 5y agoIt is a problem[1][2]. Desktop is the only use case I even had in mind. I only threw in the mobile/desktop mention in order to reference what mobile browsers do with the address bar and a last minute thought about how the availability of a mouse pointer presents the opportunity to add a little polish. Sticky headers, whether on mobile or desktop, are worse than animated banners. 1. https://alisdair.mcdiarmid.org/kill-sticky-headers/ https://alisdair.mcdiarmid.org/kill-sticky-headers/ 2. https://news.ycombinator.com/item?id=21699871 https://news.ycombinator.com/item?id=21699871
- mkoryak 5y agoYou said you dont respond to comments, but you lied. As an author of a sticky table header plugin, I disagree with you about sticky headers being bad :) I do like your idea about scrolling them away, I'll make that be a thing in mine.
- cxr 5y ago"Scrolling them away" is the default behavior. (Just never make them sticky.)