When using opacity to fade in or fade out over time using jQuery.animate, you’ll run into font rendering issues with all versions of Internet Explorer.

This leaves you with 2 options:

Use jQuery’s opacity(‘show’) or opacity(‘hide’) shortcut properties which handle IE’s shortcomings, or Set the filter css property to ‘none’ once you’ve completed your animation Obviously, if you’re fading something in from being completely hidden, option 1 makes sense, otherwise you’ve got no choice but to use option 2.

I came across this as I had font rendering issues for Cruiseabout in tabs content that was being caused by my use of opacity in FCL.TABS. As a result, I’ve patched FCL.TABS to use opacity’s “show” and “hide” properties instead of “0? and “1? and the problem has been fixed.

Broken code

$tabContent.css('opacity', 0);
$tabContent.animate(
{
opacity: 1
}, 350);

Fixed code

$tabContent.css('opacity', 'hide');
$tabContent.animate(
{
opacity: 'show'
}, 350);
Sam Deering Sam Deering
Sam Deering is a Front-end Web Developer who specialises in JavaScript & jQuery. Sam is driven and passionate about sharing his knowledge to educate others.
Stay ahead of the game Exclusive content for developers and digital experts Go Premium