Skip to content

Instantly share code, notes, and snippets.

@JonRowe
Forked from rcarver/gist:192350
Created January 7, 2010 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonRowe/271543 to your computer and use it in GitHub Desktop.
Save JonRowe/271543 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
// FORK IDEA
// By wrapping in try catch you can fallback to Typekit's default JS if they change the experimental feature.
try
{
// *** EXPERIMENTAL ***
//
// This is an experimental method to be notified when Typekit's fonts have loaded.
//
// It will almost certainly change! Please do not use this on a live site. Please
// do let us know what you think by forking this gist, contacting us at
// support@typekit.com or on Get Satisfaction - http://getsatisfaction.com/typekit
//
Typekit.load("your-kit-id", {
beforeLoad: function(data) {
// fonts are not loaded!
},
afterLoad: function(data) {
// fonts are loaded!
}
});
}catch(e){try{Typekit.load();}catch(e){}}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment