开发者

Lightbox loading, but image isn't

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜