0

JQuery GalleryViewプラグインを使用したWebページがあり、アクティブに選択されたレコードであっても、何らかの理由でフィルムストリップのサムネイルが常にフェードします。最初にバインドするときだけ、最初の画像は鮮明ですが、画像をスクロールすると、フィルムストリップの画像は色あせたままになります。私のウェブページは次の場所からアクセスできます。

http://ssdev01.uis.kent.edu/VotingApplication/Main.aspx

ページが表示されたら、プラグインの「HomecomingKing」または「HomecomingQueen」オプションをクリックしてください。助けてください

4

1 に答える 1

1

You're using GalleryView 3.0b3, released March 15, 2011, with jQuery 1.3.2, released February 19, 2009. The latest version of jQuery is 1.5.2, released March 31, 2011.

Update jQuery.


Edit

Looking through the Galleria source code, this is the bit that fades back out, unless this is the currently selected image:

.mouseout(function(){
    //Don't fade out current frame on mouseout
    if(!$(this).parent().parent().hasClass('current')){
        $(this).stop().animate({opacity:opts.frame_opacity},300);
    }
});

but in your page, $(this).parent().parent().hasClass('current') returns false. I think that you're not using exactly the right HTML structure that GalleryView expects, as in this demo. In your page, $(this).parent().parent() is a <div>, but based on that demo, GalleryView seems to expect it to be an <li>.

So, I see are two possible fixes:

  • Use raw markup ("raw" as in, before GV modifies it) with structure that's identical to the HTML structure in the GV demo I linked, or

  • (I'm less sure about this one) change line 595 of jquery.galleryview-3.0.js from

      if(!$(this).parent().parent().hasClass('current')){$(this).stop().animate({opacity:opts.frame_opacity},300);}
    

    to

      if(!$(this).closest('li').hasClass('current')){$(this).stop().animate({opacity:opts.frame_opacity},300);}
    
于 2011-04-26T19:18:59.100 に答える