jQuery fadeIn fadeOut文本在Internet Explorer中看起来很糟糕IE:正在修复

jQuery fadeIn fadeOut文本在Internet Explorer中看起来很糟糕IE:正在修复,jquery,internet-explorer,Jquery,Internet Explorer,我已经尝试过以前在这里(和其他地方)发布的解决方案,在IE浏览器中的jQuery fadeIn和fadeOut期间,这些解决方案看起来像像素化的和糟糕的文本 两种解决方案似乎很常见:添加背景色或删除“过滤器”属性 对于这种设计,我无法使用背景色修复(这有助于但无论如何也不能完全消除问题) 因此,我一直在尝试“删除fadeIn后的过滤器属性”修复。 但它不会修复文本,“removeAttribute”版本会停止脚本。 你们是怎么让它工作的 我的jQ代码如下 谢谢你考虑这个问题 ==========

我已经尝试过以前在这里(和其他地方)发布的解决方案,在IE浏览器中的jQuery fadeIn和fadeOut期间,这些解决方案看起来像像素化的和糟糕的文本

两种解决方案似乎很常见:添加背景色或删除“过滤器”属性

对于这种设计,我无法使用背景色修复(这有助于但无论如何也不能完全消除问题)

因此,我一直在尝试“删除fadeIn后的过滤器属性”修复。 但它不会修复文本,“removeAttribute”版本会停止脚本。 你们是怎么让它工作的

我的jQ代码如下

谢谢你考虑这个问题

=====================================================================

//此循环基于Pointy的另一个Stackoverflow答案

    var divs = $('.myDiv'), i = 0;
    function reveal() {
        if (i == divs.length) divs.fadeIn(inTime, function(){           
            $('.mainPadding').css("height", "4000px"); 
            }); 
        divs.eq(i).fadeIn(inTime, function(){
               //$(this).style.removeAttribute('filter');
               $(this).removeAttr("filter");
            }).delay(waitTime).fadeOut(outTime, function() {
                i++; 
                setTimeout(reveal, 0);
          });
    }
    setTimeout(reveal, 0);   

这是我在上面发现的。。。


谢谢约翰·K。在上找到了类似的东西,但它也不能解决IE中的问题,仍然在处理这个问题。jQuery.fn.fadeIn=function(speed,callback){返回这个.animate({opacity:'show'},speed,function(){if(jQuery.browser.msie)this.style.removeAttribute('filter');if(jQuery.isFunction(callback))callback();});[…重复淡出]嗯,我已经尝试将这些覆盖放在html页面和jQuery文件本身的末尾。但到目前为止,它在IE中并没有任何区别。是否有一个特殊的位置,这个代码必须放置,以使其工作?再次感谢您的帮助,非常感谢。我不确定…如果您将它放在html页面中,它会起作用。。。您是否尝试过在IE中使用开发者工具或Firefox进行调试?
// When fading a html node with the .fadeIn() and .fadeOut() // functions in jQuery, IE drops the windows Cleartype rendering; // which results in very ugly text. This override corrects that problem

    jQuery.fn.fadeTo = function(speed, to, callback) {
        return this.animate({ opacity: to }, speed, function() {
            if (to == 1 && jQuery.browser.msie)
                this.style.removeAttribute('filter');

            if (jQuery.isFunction(callback))
                callback();
        });
    };