jqueryinternet-explorerfadeinfadeoutcleartype

jquery fadeIn/fadeOut ie cleartype glitch


I´m currently trying to add the feature that is discussed here: http://blog.bmn.name/2008/03/jquery-fadeinfadeout-ie-cleartype-glitch/

A glitch in IE7 when fading with the .fadeIn() and .fadeOut() in jQuery, IE drops the windows Cleartype rendering; which results in very ugly text.

Am I understanding it correctly if I say that I could replace:

.fadeIn()

with

.customFadeIn('slow', function(customFades) {})

? assuming I have function customFades()


Solution

  • after some fix'n and trix'n... works now :)

        function customFades() {
        (function($) {
            $.fn.fadeIn = function(speed, callback) {
                return this.animate({opacity: 'show'}, speed, function() {
                    if (jQuery.browser.msie) 
                        this.style.removeAttribute('filter'); 
                    if (jQuery.isFunction(callback))
                        callback(); 
                });
            };
    
            $.fn.fadeOut = function(speed, callback) {
                return this.animate({opacity: 'hide'}, speed, function() {
                    if (jQuery.browser.msie) 
                        this.style.removeAttribute('filter'); 
                    if (jQuery.isFunction(callback))
                        callback(); 
                });
            };
        })(jQuery);
    }