Animation disables font in Internet Explorer

Published 22 Sep 2010

Yesterday, I built a simple demo page where I demonstrate how easily you can get Web Fonts to work.

However, as I animated some of the elements on the page, I noticed that Internet Explorer started disabling the fonts, falling back to the original fonts.

Turns out that this button code:

<button onclick="$('.comic').animate({fontSize: '3em', });">Click me!</button>

was too much for Internet Explorer to handle. It should be:

<button onclick="$('.comic').animate({fontSize: '3em' });">Click me!</button>

This fixes the font disabling bug. Thanks for not handling any exceptions, IE!