Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chered/0387eb93eee7cd69ae70 to your computer and use it in GitHub Desktop.
Save chered/0387eb93eee7cd69ae70 to your computer and use it in GitHub Desktop.
How to show or hide an element based on url using Jquery
// jQuery Show / Hide Div based on URL parameter
if(window.location.href == "http://test.dev/node/1?utm_medium=adwords"){
$('.menu-818').hide();
$('.menu-900').show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment