Skip to content

Instantly share code, notes, and snippets.

@ryanwoodsmall
Forked from alisdair/kill-sticky.js
Created May 27, 2020 22:28
Show Gist options
  • Save ryanwoodsmall/732821950015a3a5ee1c12d8c2a6efe9 to your computer and use it in GitHub Desktop.
Save ryanwoodsmall/732821950015a3a5ee1c12d8c2a6efe9 to your computer and use it in GitHub Desktop.
Kill sticky headers.
(function () {
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
if (getComputedStyle(elements[i]).position === 'fixed') {
elements[i].parentNode.removeChild(elements[i]);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment