trvswgnr / bs5-lightbox

A pure JS lightbox gallery plugin for Bootstrap 5 based on the Modal and Carousel components
https://trvswgnr.github.io/bs5-lightbox/
MIT License
125 stars 28 forks source link

Does it work with 5.3.0? #69

Closed peterstavrou closed 10 months ago

peterstavrou commented 10 months ago

I have:

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>

<script src="https://cdn.jsdelivr.net/npm/bs5-lightbox@1.8.3/dist/index.bundle.min.js"></script>

and have used the example from the documentation

<a href="https://unsplash.it/1200/768.jpg?image=251" data-toggle="lightbox">
    <img src="https://unsplash.it/600.jpg?image=251">
</a>

and instead of the lightbox opening, it liks to the image url.

xpbe0 commented 10 months ago

+1

@trvswgnr : tested also with data-bs-* elements to no avail.. Thanks for checking 🙇

hashimaziz1 commented 10 months ago

For what it's worth I experienced the same thing on BS 5.2.3 and decided to just implement a standard carousel inside of a modal, since those are the dependencies the package relies on and I'm not sure it's adding/fixing anything apart from making that boilerplate easier - the documentation doesn't seem to mention anything specific.

hashimaziz1 commented 10 months ago

Related: https://github.com/trvswgnr/bs5-lightbox/issues/62

peterstavrou commented 10 months ago

For what it's worth I experienced the same thing on BS 5.2.3 and decided to just implement a standard carousel inside of a modal, since those are the dependencies the package relies on and I'm not sure it's adding/fixing anything apart from making that boilerplate easier - the documentation doesn't seem to mention anything specific.

Good idea. I just put the image inside a modal and customized it a little with CSS classes.

MrSATAN1999 commented 4 months ago

Maybe I am late but I had the same problem and figured it by loading JS at the very end of the body. Hope it helps.