-
-
Save nocodesupplyco/98bc1828be7d627d6bcf6a9749d07b10 to your computer and use it in GitHub Desktop.
Hide/show Based on URL Parameter
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
const queryString = window.location.search; | |
const urlParams = new URLSearchParams(queryString); | |
// If URL has "partner" do something | |
if (urlParams.has("partner")) { | |
var partnerBtn = document.getElementById("partner-btn"); | |
partnerBtn.style.display = "inline-block"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment