How to fix Image lightbox errors

I am using swiper.js library for slider now image slider working fine.
but I used another library for image light-box (Photoswipe.js) and when click image it’s pop up modal and slide perfectly but all button are disappears like close ,navigation etc

Here is image of slider

Here is the light-box one

I am getting these error in console when click slide image and above light-box appears

the-dex.html:573 Uncaught ReferenceError: mySwiper is not defined
    at a.<anonymous> (the-dex.html:573)
    at Da (photoswipe.min.js:4)
    at Ra (photoswipe.min.js:4)
    at a.close (photoswipe.min.js:4)
    at HTMLDivElement.v.onGlobalTap (photoswipe-ui-default.min.js:4)
    at qc (photoswipe.min.js:4)
    at a.onTapRelease (photoswipe.min.js:4)
    at Da (photoswipe.min.js:4)
    at Object.Rb (photoswipe.min.js:4)
    at a.handleEvent (photoswipe.min.js:4)
(anonymous) @ the-dex.html:573
Da @ photoswipe.min.js:4
Ra @ photoswipe.min.js:4
close @ photoswipe.min.js:4
v.onGlobalTap @ photoswipe-ui-default.min.js:4
qc @ photoswipe.min.js:4
onTapRelease @ photoswipe.min.js:4
Da @ photoswipe.min.js:4
Rb @ photoswipe.min.js:4
handleEvent @ photoswipe.min.js:4

The error message of mySwiper is not defined tells us that the mySwiper library need to be provided.

1 Like

Ohh thanks I put that but now I don’t show any error but still buttons are disappear!

Good, that is progress, and teaches us that the mySwiper error was not responsible for the buttons.

1 Like