Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Created December 19, 2022 15:10
Show Gist options
  • Save nocodesupplyco/71ff7bf67d6f634fb164da537d727472 to your computer and use it in GitHub Desktop.
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