Created
March 12, 2014 06:40
-
-
Save gbertb/9502005 to your computer and use it in GitHub Desktop.
How to load Font Awesome asynchronously
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
<!-- | |
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> |
Really ?
You do not need any script for putting font awesome at the bottom
what about reserving some space for the font awesome icon so the page doesn't jump around?
Good Script .. Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awsome :)