0

这一点不起作用:

$(this).stop().fadeTo('slow', 0.4, function() {
                    $(this).addClass('hidden')
                });

所以我测试了这个:

$(this).css('opacity',0.3);

在 IE8 中没有成功:/(IE7 + Chrom + FF + Safari 一切正常 - 调试 js 一切正常......)

所以我去谷歌搜索问题并尝试了这个:

 $.fn.customFadeTo = 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();
    });
};

这(CSS ...):

display:inline-block;

在 IE8 中仍然没有成功...任何帮助???

更新:这个接缝工作:

$(this).children('img').stop().fadeTo('slow', 0, function() {});

所以这是图像的问题

更新: DOM 元素 -> $(this) 指

<a class="alle-referenzen referenzenDetailLink" href="webdesign-referenzen-hotel-chesa-randolina" title="Hotel Chesa Randolina"> 
                <span> 
                    <b>Hotel Chesa Randolina</b><br /> 
                    Webdesign, Blog, CMS, Programmierung, Suchmaschinenoptimierung
                </span> 
                <img src="/images/content/Referenzen/HotelRandolina/Website_Hotel-Randolina.jpg" alt="Hotel Chesa Randolina" /> 
                <img class="out" src="/images/content/Referenzen/HotelRandolina/Logo_Hotel-Randolina.jpg" alt="Hotel Chesa Randolina" />            
            </a> 
4

1 回答 1

0

首先,您说“这个位不起作用”,但没有说明您想要实现什么,也没有说明该代码的结果是什么或this指的是什么。

看看我在另一个问题中提出的http://jsfiddle.net/YhzPh/看看是否有帮助。

于 2011-05-04T15:37:44.727 回答