Skip to content

Instantly share code, notes, and snippets.

@jakebresnehan
Created March 7, 2012 04:01
Show Gist options
  • Save jakebresnehan/1990864 to your computer and use it in GitHub Desktop.
Save jakebresnehan/1990864 to your computer and use it in GitHub Desktop.
Loading typekit asynchronously with yepnopejs
<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