Home › Forums › JavaScript › Show a hidden DIV with URL parameter › Reply To: Show a hidden DIV with URL parameter
December 1, 2017 at 6:54 pm
#263234
Shikkediel
Participant
The search
method will return an integer, so it won’t ever be true
. You’d probably want to do something like this:
if (url.search('show=true') >= 0) {
You’ll notice I’ve used “boomerang” to match something in the url, you can see the full path with the line that’s commented out.