nanostudio-org / nanogallery2

a modern photo / video gallery and lightbox [JS library]
https://nanogallery2.nanostudio.org
755 stars 111 forks source link

Lightbox standalone not working with Ajax loaded partial views. #395

Open Vdm88 opened 1 year ago

Vdm88 commented 1 year ago

Hello, A bit complicated to replicate this. I have a partial view loaded with Ajax inside a page. If i load the js inside the partial view the lightbox works perfect, if i load the js in the big page ( cause i dont want to load the js on each partial view ) is not working anymore. I suspect that loading the html after the load of the js is the issue. i only intend to use the lightbox since the images are already displayed in a swiper.

Andrew-web-coder commented 1 year ago

Maybe try an alternative like Fancybox5, it works with any content, including what is created later.

Vdm88 commented 1 year ago

Fancybox5 is paid