开发者

Lightbox loading, but image isn't

开发者 https://www.devze.com 2023-03-13 19:06 出处:网络
The light box pops up, but doesn\'t load the image. I have hacked this entire gallery together,from Gallerific plugin and jQuery lightbox.

The light box pops up, but doesn't load the image. I have hacked this entire gallery together, from Gallerific plugin and jQuery lightbox.

I have tried adding this to Gallerifi开发者_如何学Pythonc plugin with little success:

            onTransitionIn: function() {
    $('#slideshow').fadeTo('fast', 1.0);
    $('#slideshow span.image-wrapper').fadeTo('fast', 1.0);
    $('#slideshow').fadeTo('fast', 1.0);
    $('#slideshow span.image-caption').fadeTo('fast', 1.0);
    $('#slideshow').fadeIn('fast', function() {
        $('a.lightbox').lightBox();
    });
},

http://lytesting.com/mdh/templates/mdh/gallery.html


The problem is that you are pointing to a #hash_fragment in your links. If you point them to the actual image source it will load into the lightbox.

Lightbox is trying to be unobtrusive and use graceful degradation, so linking to the image directly is also a good idea - so your page still works without javascript.

There may be ways to configure it with the #hash links, but by testing the above solution with Firebug, it worked for me in FF4.

<div class="slideshow" id="slideshow">
    <span class="image-wrapper current">
        <a href="{YOUR_IMAGE_URL}" class="lightbox"> <!-- Instead of #2, etc. -->
            &nbsp;<img alt="Title #0" src="images2/art.jpg">
        </a>
    </span>
</div>


Looks fine to me. I see the image. The animation is a bit choppy, and the caption is duplicated, but the image appears.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号