Dev

Document Fade-in Script

If you would like a non-intrusive, fail-gracefully solution to softening page loads and preventing FOUC, place the following AFTER your jQuery script tag.

<script>
  ( function( $ ) {
    $( 'html' ).css( { 'opacity': 0 } );
      $( function() {
        var FadeIn = setTimeout( function(){
          $( 'html' ).animate( { 'opacity': 1 } );
        }, 3000 );
        $( window ).on( 'load', function() {
          clearTimeout( FadeIn );
          $( 'html' ).animate( { 'opacity': 1 } );
        } );
      } );
    } )( jQuery );
</script>
Like something you see? Drop me a line!