contentdb/app/public/static/js/gallery_carousel.js
rec 40a59a4d31
Adding in a carousel for packages (#475)
Co-authored-by: recluse4615 <recluse4615@users.noreply.github.com>
2023-10-15 22:14:08 +01:00

14 lines
415 B
JavaScript

// @author recluse4615
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
"use strict";
const galleryCarousel = new bootstrap.Carousel(document.getElementById("galleryCarousel"));
document.querySelectorAll(".gallery-image").forEach(el => {
el.addEventListener("click", function(e) {
galleryCarousel.to(el.dataset.bsSlideTo);
e.preventDefault();
});
});