Support » Plugin: WP jQuery Lightbox » Link one lightbox to another lightbox

  • Resolved buymylife


    Greetings — First off, great plugin. Many thanks for all your work.

    I’m running into the early stages of an issue I’d like to get your take on: I’m creating a fully custom gallery/thumbnail/lightbox combo with two galleries on the same page. The first gallery has a group of standard images; the second gallery has alternate versions of the same images that are in the first gallery. I’m attempting to link the lightboxed image in one gallery to its lightboxed equivalent in the other gallery.

    So far, the best option has seemed to be using captions — that is, give each image a caption with a link of its partner in the other gallery. Something like <a href="http://localhost/img/image-alternate.jpg">view alternate</a>

    I thought this miiiight be an easy solution, but it’s not working. The caption correctly displays the link, but clicking the link loads the alternate image in _self without a lightbox. I’ve tried using an event.preventDefault within your showImage function… and I can get it do some of what I want… but I can’t seem to trigger the lightbox after the prevent. I know this is wrong, but here’s a version of what I’ve tried (my js skills aren’t quite good enough to figure out how to pass the caption link’s rel attribute):

    $("#caption a").click(function(event){
    linkLocation = this.href;
    $("#lightbox").fadeOut(400, redirectPage);
    function redirectPage() {
    window.location = linkLocation;

    I fully realize this is outside the scope of the plugin, but I’m nevertheless wondering if you have any ideas. Many thanks in advance. Hope this finds you well —

Viewing 1 replies (of 1 total)
  • Plugin Author ulfben


    Sorry. The mod you need is very involved. There is no easy solution I’m afraid.

Viewing 1 replies (of 1 total)
  • The topic ‘Link one lightbox to another lightbox’ is closed to new replies.