Created
February 23, 2018 16:16
-
-
Save completejavascript/ede0bfeff581a878b7064c739a93750b to your computer and use it in GitHub Desktop.
Set hash location for url address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set hash location for url address | |
function setHashLocation(id) { | |
var scrollmem = $('html,body').scrollTop(); | |
window.location.hash = id; | |
$('html,body').scrollTop(scrollmem); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment