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

tag pre-eats me, but how to get it later? How can I mark a portion of HTML so that the browser can not be parsed if the script shutdown ?

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

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -