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);
opacity: 1
}, 350);

Fixed code

$tabContent.css('opacity', 'hide');
opacity: 'show'
}, 350);
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.

Free Guide:

How to Choose the Right Charting Library for Your Application

How do you make sure that the charting library you choose has everything you need? Sign up to receive this detailed guide from FusionCharts, which explores all the factors you need to consider before making the decision.

Learn JavaScript for free!
Free course: Introduction to JavaScript

Yours when you take up a free 14-day SitePoint Premium trial.