Created
March 7, 2012 04:01
-
-
Save jakebresnehan/1990864 to your computer and use it in GitHub Desktop.
Loading typekit asynchronously with yepnopejs
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
<script> | |
Modernizr.load([{ | |
// Does the browser support @font-face? | |
test: Modernizr.fontface, // Should return a boolean | |
// Yep! Get the fonts | |
yep : 'http://use.typekit.com/rndmstr1ng.js', | |
complete: function() { | |
// Load complete! Tell Typekit to start up | |
try { Typekit.load(); } catch(e) {}; | |
// Profit! | |
} | |
}]); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment