Sunday, February 27, 2011

Update: Google WebFont FOUT (Flash of Unstyled Text)

I recently wrote about how I'm dealing with the Google WebFont FOUT (Flash of Unstyled Text). On one occasion I saw a case where the Google script failed to load and I ended up with a blank area on my screen where the heading should have been. So I put in one more small change so that after 10 seconds the h1 will be made visible no matter what else is going on.

Here's the code I added:

var showH1 = function() {
      $("div.article h1").css({'visibility':'visible'});

Post a Comment