Skip to content

Instantly share code, notes, and snippets.

@eboyer
Created September 14, 2011 21:15
Show Gist options
  • Save eboyer/1217810 to your computer and use it in GitHub Desktop.
Save eboyer/1217810 to your computer and use it in GitHub Desktop.
typekit loading
//Fade in content after Typekit loads.
odc.fadeContent = function(){
//Content you want to animate in, hide on load.
$("div.inner").hide();
var htmlInterval = window.setInterval(function() {
var htmlClass = $('html').attr('class');
if(htmlClass.indexOf('wf-active') >= 0) {
//Content you want faded in.
$("div.inner").fadeIn(1500, function(){
//Clear interval after animation completes.
window.clearInterval(htmlInterval);
});
}
}, 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment