Skip to content

Instantly share code, notes, and snippets.

@Eccenux
Created October 19, 2016 20:41

Revisions

  1. Eccenux created this gist Oct 19, 2016.
    15 changes: 15 additions & 0 deletions snippet.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    <!-- with and without JS visibility and display -->
    <style type="text/css">
    .withJSvisible {visibility: hidden}
    .withJSdisplay {display:none}
    </style>
    <script type="text/javascript">
    document.write(String.fromCharCode(60),'style type="text/css"',String.fromCharCode(62),
    ' .withJSvisible {visibility:visible !important} ',
    ' .withoutJSvisible {visibility:hidden !important} ',

    ' span.withJSdisplay,a.withJSdisplay {display:inline !important} p.withJSdisplay,div.withJSdisplay {display:block !important} ',
    ' .withoutJSdisplay {display:none !important} ',
    String.fromCharCode(60),'/style',String.fromCharCode(62)
    );
    </script>