Picnic Website Code Tutorials

Hide div with URL query string and javascript


View Demo

You put the query string at the end of the URL (?test=123). And use some JS to read the query string and then in this case hide the associated div.

HTML query string

<a href="query-string-demo.php?test=123">query string link</a>


if (/123/.test(window.location.href)) {
	document.getElementById('hidediv').style.display = 'none';

Need help adding this or other code to your website? Post it here in the forum! Forum


Top Donators

Friends of Mine