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

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

@kwoodberry101

Description

@kwoodberry101

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions