I would like to prevent people from using my website when they don’t have java script enabled. Can anyone point me to a document that describes how to do this or maybe a simple setting ? I have seen several examples on the internet but none of the worked nor where the specific to a liquid environment.
In your theme.liquid layout find the <body ..> tag and modify like this:
...
The point here is to assign a no-js class on the body element and then, piece of javascript code will remove it and assign class js to the body element.
CSS rule will output a message on white background until javascript code is run.
Be sure to keep other attributes of the body intact, just modify the class.
HI TIm, Thank you for the reply. I tired your solution and it didn’t work. Still have full access when JavaScript is disabled. I don’t see any difference with it enabled or disabled.