Show a DIV if the URL contains a certain list strings
-2
I'm looking for a way to show/hide a certain DIV based on a list of URL's I have that need to display it. The problem Im running into is that these URL's may contain various parameters that I need to ignore and thats where Im running into trouble. if(window.location.href == "http://www.google.com/example-one" || window.location.href=="http://www.google.com/example-two"){} I need a more clean way to do this and just check if multiple strings exist somewhere in the URL.
javascript jquery
share | improve this question
asked Nov 20 '18 at 19:33
John Moore
16 7 ...