midzer / tobii

An accessible, open-source lightbox with no dependencies
https://midzer.github.io/tobii/demo/
MIT License
196 stars 20 forks source link

Custom Selector JS Error #116

Open Racquetballer opened 1 year ago

Racquetballer commented 1 year ago

Midzer suggested that I post this possible bug when using a custom selector.

I'm using a custom selector and am running into an issue. I'm getting my images via an ajax call so I'm calling the reset method which appears to work.

const tobii = new Tobii({ selector: '.tobii-lightbox', autoplayVideo: false, zoom: true }); tobii.reset();

Each of the 9 images below has this tobii-lightbox class but the first one does not show the zoom image. When I try to click on any of the other images I get a js error:

image

Do you happen to know why it's erroring out? Is it because I'm using a custom selector? I'm using bootstrap so I cannot use the lightbox class.

I do see the injected dialog at the end of my body tag.

image

midzer commented 4 months ago

@Racquetballer Can you provide a minimal code example of this issue?