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 に答える