-
-
Save PaulRayden/e65ad63cc7ee3834e7b3f565fc796a72 to your computer and use it in GitHub Desktop.
How to load Font Awesome asynchronously
This file contains hidden or 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
<!-- | |
How to load Font Awesome asynchronously | |
Use: Just put this script on the bottom/footer of your web | |
--> | |
<script type="text/javascript"> | |
(function() { | |
var css = document.createElement('link'); | |
css.href = '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css'; | |
css.rel = 'stylesheet'; | |
css.type = 'text/css'; | |
document.getElementsByTagName('head')[0].appendChild(css); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment