Last active
September 5, 2016 06:24
-
-
Save gustafnk/e42be44d70ae9532b1987c1bcbe95da5 to your computer and use it in GitHub Desktop.
Avoid flickering of hincludes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Put this code before the first hinclude or in the <head> element --> | |
<script> | |
<!-- https://gist.github.com/egeorjon/6755681 --> | |
document.documentElement.className = document.documentElement.className.replace( /(?:^|\s)no-script(?!\S)/g , '' ) | |
</script> | |
<style> | |
hinclude:not(.included) { | |
visibility: hidden; | |
} | |
.no-script hinclude, hinclude.included { | |
visibility: visible; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment