Photo Gallery
jQuery LightGallery is a customizable, modular, responsive, lightbox gallery plugin for jQuery.
LightGallery requires two source input images to function: thumbnail and preview image. Preview image path should be set on the
<a> and the thumbnail path should be set on the <img> src as shown in the below code example.
<div class="row lightbox photos">
<a href="..." class="col-md-2 col-4">
<div class="lightbox__item photos__item">
<img src="....jpg" alt="" />
</div>
</a>
<a href="..." class="col-md-2 col-4">
<div class="lightbox__item photos__item">
<img src="..." alt="" />
</div>
</a>
<a href="..." class="col-md-2 col-4">
<div class="lightbox__item photos__item">
<img src="..." alt="" />
</div>
</a>
</div>
if ($('.lightbox')[0]) {
$('.lightbox').lightGallery({
enableTouch: true
});
}Files required:
| Type | Files |
|---|---|
| Custom SCSS |
/src/scss/inc/vendor-overrides/_lightgallery.scss
/src/scss/inc/_photos.scss
|
| Javascript | /src/js/vendors/light-gallery.js |
| Library |
/resources/vendors/lightgallery/css/lightgallery.min.css
/resources/vendors/lightgallery/js/lightgallery-all.min.js
|