Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Created December 19, 2022 15:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nocodesupplyco/71ff7bf67d6f634fb164da537d727472 to your computer and use it in GitHub Desktop.
Click Something Based on ID in URL
// Use or update each instance of "example" for your use case of the URL parameter and ID to target
$(function() {
if(window.location.hash == "#example") {
document.getElementById("example").click();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment