Show/Hide divs based on passed variable


#1

I have been trying to pass a variable in the url that decides whether or not to show a <div>, but no matter what I pass, all the divs stay hidden. My project is silly-coil. Thanks in advance for the help! I am new at html, so this could just be a rookie mistake.


#2

process.env isn’t available on the client, so it won’t be able to check.


#3

That shouldn’t matter. I get the same result when checking for a string.


#4

You don’t specify the source location of your JavaScript file in the index.html, so it isn’t being used - see https://www.w3schools.com/tags/att_script_src.asp


#5

Thank you. This fixed the problem.