Last active
April 11, 2019 16:21
-
-
Save gtempesta/5c9922cea082b2fc34cc308d576646b5 to your computer and use it in GitHub Desktop.
Turn URL parameter into hash
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
<script> | |
// use the `anchor` parameter to change the hash | |
var newHash = "<?php echo $_GET['anchor']; ?>"; | |
window.location.hash = newHash; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment