Hiding elements that require JavaScript without JavaScript

In the Hiding elements that require JavaScript without JavaScript article, dade explains techniques to hide elements when JavaScript is not enabled.
The result is a generic class that can be applied to hide elements, and works with a clever use of <noscript>:

<noscript>
    <style>
        .d-js-required {
            display: none;
        }
    </style>
</noscript>

(via)

blog comments powered by Disqus