Created
February 1, 2018 17:47
-
-
Save Tom-Millard/657b44f0d00f948d5656941c8b5b6fa5 to your computer and use it in GitHub Desktop.
Lazy load google fonts
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
(function(d){ | |
var x = d.createElement("link"); | |
var y = d.getElementsByTagName("script")[0]; | |
x.rel = "stylesheet"; | |
x.href = "https://fonts.googleapis.com/css?family=Raleway:400,900"; | |
y.parentNode.insertBefore(x, y); | |
})(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Visit Here to See LazyLoad Google Fonts Using Pure Vanilla Js