How to hide parts of HTML when JavaScript is disabled? -
I am trying to adjust users without JavaScript (by the way, is it worth the effort nowadays?) < / P>
In a HTML file I want to execute it if the script is on , and the other part if the scripts are closed
Here is a video tutorial how can this be done with jQuery:
< P> Code: & lt; Body class = "noScript" & gt; & Lt; Script & gt; $ ('Body') removeClass ('noscript'). & Lt; / Script & gt; & Lt; / Body & gt;
And then just hide related elements under body.noscript
.
Edit However, jQuery is probably bloated for a small fix like this, so I suggest that there is no need for a digital.
Comments
Post a Comment