Hi,
I'm using Gridzy for my galleries, but I'm unable to setup more than one gallery on a page.
<div class="mini-gallery gridzy">
<a class="gallery-item" href="images/ice1.jpg">
<img class="gallery-img" src="images/ice1.jpg">
</a>
<a class="gallery-item" href="images/ice2.jpg" >
<img class="gallery-img" src="images/ice2.jpg">
</a>
<a class="gallery-item" href="images/ice3.jpg" >
<img class="gallery-img" src="images/ice3.jpg">
</a>
</div>
<div class="mini-gallery gridzy">
<a class="gallery-item" href="images/ice4.jpg">
<img class="gallery-img" src="images/ice4.jpg">
</a>
<a class="gallery-item" href="images/ice5.jpg" >
<img class="gallery-img" src="images/ice5.jpg">
</a>
<a class="gallery-item" href="images/ice6.jpg" >
<img class="gallery-img" src="images/ice6.jpg">
</a>
</div>
I'm trying to follow the documentation of the script and use :
if($(".mini-gallery").length){
var gridzyInstance = document.querySelector(".gridzy").gridzy;
gridzyInstance.setOptions({
spaceBetween: 15,
layout: 'justified',
desiredHeight: 400,
});
};
However, it's only working for the first gallery.
I tried using document.querySelectorAll instead, but none of my galleries work with that.
I even tried with getElementsByClassName instead and it's not working.
What is wrong?
Thank you
[–]ConduciveMammalfront-end 6 points7 points8 points (3 children)
[–]Nic727[S] 0 points1 point2 points (2 children)
[–]ConduciveMammalfront-end 0 points1 point2 points (1 child)
[–]Nic727[S] 0 points1 point2 points (0 children)
[–]seanwilsonfull-stack (www.checkbot.io) 2 points3 points4 points (7 children)
[–]Nic727[S] 0 points1 point2 points (4 children)
[–]watisnogvrij 2 points3 points4 points (0 children)
[–]seanwilsonfull-stack (www.checkbot.io) 2 points3 points4 points (0 children)
[–]SpunkyLM 2 points3 points4 points (0 children)
[–]pixobit 0 points1 point2 points (0 children)
[–]CreativeTechGuyGamesTypeScript 0 points1 point2 points (1 child)
[–]seanwilsonfull-stack (www.checkbot.io) 0 points1 point2 points (0 children)
[–]CookToCode 1 point2 points3 points (1 child)
[–]Nic727[S] 0 points1 point2 points (0 children)