i tried to use lightgallery.js (https://www.youtube.com/watch?v=nT20JV1nRZg) on my website. The Problem is, when i am clicking on an image, the gallery opens and gets stuck in the loading screen. I think its due to my html structure but i dont know how to fix it.
HTML:
<section class="tiles">
<article class="style6">
<span class="image">
<img src="images//graff_p/_DSC9464.jpg" alt="" />
</span>
</article>
<article class="style6">
<span class="image">
<img src="images//graff_p/_DSC9511.jpg" alt="" />
</span>
</article>
...
</section>
JS:
lightGallery(document.querySelector('.tiles'))
EDIT:
Code from tutorial that works:
HTML:
<div class="gallery">
<a href="img1.jpg">
<img src="img1.jpg" alt="">
</a>
<a href="img2.jpg">
<img src="img2.jpg" alt="">
</a>
...
</div>
JS: lightGallery(document.querySelector('.gallery'))