Skip to content

Instantly share code, notes, and snippets.

@robertcedwards
Created June 27, 2019 18:25
Show Gist options
  • Save robertcedwards/3d6a3f2ec7c9dc8524d7b2c2f408ea87 to your computer and use it in GitHub Desktop.
Save robertcedwards/3d6a3f2ec7c9dc8524d7b2c2f408ea87 to your computer and use it in GitHub Desktop.
Another method for onpage load
var shiftWindow = function() { scrollBy(0, -50) };
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment