Idea: add LoadCSS
-
You, guys, are doing an incredible job! Sometimes, I’m think my WordPress website is a static website… it’s crazy!
So, something you can easily is LoaddCSS: https://github.com/filamentgroup/loadCSS
Example:
<script> var loadCSSFiles = function() { var links = ['https://fonts.googleapis.com/css?family=PT+Serif|Roboto:400,700&subset=latin-ext'], headElement = document.getElementsByTagName('head')[0], linkElement, i; for (i = 0; i < links.length; i++) { linkElement = document.createElement('link'); linkElement.rel = 'stylesheet'; linkElement.href = links[i]; headElement.appendChild(linkElement); } }; var raf = requestAnimationFrame || mozRequestAnimationFrame || webkitRequestAnimationFrame || msRequestAnimationFrame; if (raf) { raf(loadCSSFiles); } else { window.addEventListener('load', loadCSSFiles); } </script>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Idea: add LoadCSS’ is closed to new replies.