6 ms·
Interestingly, this doesn’t kill all sticky headers. In fact, there’s a special CSS position for sticky headers: position: sticky. Which this doesn’t kill.
by kuschku 9y ago
Interestingly, this doesn’t kill all sticky headers.
In fact, there’s a special CSS position for sticky headers: position: sticky.
Which this doesn’t kill.
- tim333 9y agoI made an extention doing the same thing and added an == 'fixed' || === 'sticky' recently. It's an ongoing battle. I still haven't figured returning google news to a decent look. (https://chrome.google.com/webstore/detail/zapfixed/jgiflpbkoefoepgmeifoglafkomgjbge https://chrome.google.com/webstore/detail/zapfixed/jgiflpbko...)
- nickjj 9y agoDo you somehow differentiate sticky headers from sidebars? For example my personal site uses a sticky sidebar for primary navigation and if you hide it, you won't be able to browse anything.
- tim333 9y agoNo, my thing doesn't differentiate but it does toggle so if you click it again the nav stuff comes back.
- tim333 9y agoThe code that does anything in mine is just $('*').filter(function() { var pos = $(this).css('position'); return ( pos === 'fixed' || pos === 'sticky') } ).toggleClass("_zapfix"); where _zapfix is a class where things are hidden and $ is jquery.