Created
          July 22, 2011 20:41 
        
      - 
      
- 
        Save eboyer/1100377 to your computer and use it in GitHub Desktop. 
    Fade in content after Typekit is loaded
  
        
  
    
      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
    
  
  
    
  | 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