lightbox2

why showImageNumberLabel option does not affect lightbox default setting?


I added 3 images in one page that one link triggers them, completely standard.

<div class="col-md-4 col-lg-4">
<a href="img/nibe-cert.jpg" data-lightbox="nibe-cert" data-title="ISO 9001-14001 SERTİFİKASI">
<img alt="Nibe Cert" class="border--round box-shadow-wide" src="img/nibe-cert.jpg">
<a href="img/nibe-cert-2.jpg" data-lightbox="nibe-cert" data-title="ÇEVRE POLİTİKASI"></a>
<a href="img/nibe-cert-3.jpg" data-lightbox="nibe-cert" data-title="KALİTE POLİTİKASI"></a>
</a>
</div>

And I added:

 <script>
    lightbox.option({
        "showImageNumberLabel": false
    });
</script>

But I still can see the text: image 1 from 3


Solution

  • It seems that you have to set an extra option, although the documentation does not mention directly that this option is related to showImageNumberLabel.

    Your code needs "albumLabel": false, so it becomes:

    <script>
        lightbox.option({
            "albumLabel": false,
            "showImageNumberLabel": false
        });
    </script>