Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Updating data-gallery attribute with jQuery causes odd lightbox behaviour #323

Open
kwoodberry101 opened this issue Jan 11, 2019 · 1 comment

Comments

@kwoodberry101
Copy link

kwoodberry101 commented Jan 11, 2019

Hi Ashley

I am using Bootstrap 4 with your Ekko lightbox gallery - http://ashleydw.github.io/lightbox/#image-gallery

I am filtering the images using jQuery. The filter simply shows/hides images with the matching class name.

Upon filtering I am dynamically updating the data-gallery attribute so only those filtered images are available to click through in the lightbox gallery.

Here's my development site - http://damansv2.woodberry.me.uk/gallery/ex-display/

This seems to work ok but there's a glitch which removes the abililty to page next/prev through the gallery. I assume this is because the data-gallery attribute is being changed dynamically?

To replicate the glitch, try the following:-

  1. Go to http://damansv2.woodberry.me.uk/gallery/ex-display/
  2. Click 'kitchens' filter, then click the first image and the gallery lets you correctly page forward/backwards through the 4 filtered images. Close lightbox.
  3. Click 'bathrooms' filter, then click the first image and the gallery lets you correctly page forward/backwards through the 4 filtered images. Close lightbox.
  4. Click 'all' filter, then click the first image. You are unable to page through?

Any ideas if this is a bug or what I can do to fix this?

Browser name and version
Firefox Quantum 64.0.2 (64-bit)
Windows 10

Many thanks in advance.
Kevin :)

@BjarneFred
Copy link

Hi Kevin,

Did you ever find a solution to this issue? I have been pulling my hair out over the same thing.

Cheers,

Bjarne

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants