Isotope and lightbox, how to only show the visible (filtered) images in lightbox

Discussion in 'JavaScript' started by JeffG., Aug 21, 2016.

  1. #1
    Hi,

    I am building a wordpress website. I am implementing isotope for image layout and filtering (isotope.metafizzy)

    I have configured Isotope already, so that images are layed out and filterable, this is all working fine.

    Currently, when i open an image in the lightbox, it loads all the images in the series, including images which are currently hidden (filtered by Isotope).

    I want to change my solution so that only the visible images will be loaded into the Lightbox. This way a user can use isotope to filter down to the desired set of images, and can then view these in a larger format using the lightbox.
    the code below is what is outputted by wordpress (from view page source).

    you try the code here : http://jsbin.com/gutoqaqabo/edit?html,output

    thanks for your help
     
    JeffG., Aug 21, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Don't know isotope, but couldn't you perhaps add a class with isotope to the viewable images, and set lightbox to only show images with the specific class? You could also limit Lightbox to only show one image (no forward/back buttons), but that might be counterproductive, I assume.
     
    PoPSiCLe, Aug 21, 2016 IP
  3. JeffG.

    JeffG. Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    Thanks,
    i solved my problems with using the data-box attribute to create a set of images.
     
    JeffG., Aug 22, 2016 IP
  4. Zuzanna Juszkiewicz

    Zuzanna Juszkiewicz Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    i know this is an old thread, but do you by chance have a copy of the code you used? I am having a similar problem.
     
    Zuzanna Juszkiewicz, Sep 10, 2018 IP
  5. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    819
    Best Answers:
    7
    Trophy Points:
    320
    #5
    Do you REALLY think the OP will see this since he has not been seen on DP in OVER 2 YEARS?

     
    mmerlinn, Sep 11, 2018 IP