Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Irfan-Ansari/c45a313c80f86c440b68 to your computer and use it in GitHub Desktop.
Save Irfan-Ansari/c45a313c80f86c440b68 to your computer and use it in GitHub Desktop.
force page to load on top - cause of refresh
/* force page to load on top - cause of refresh */
$(window).on('beforeunload', function(){
$(window).scrollTop(0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment