Repository navigation
Added
- Separate galleries. Set
data-lightbox-groupon an image or a parent. Triggers that share that name cycle only with each other. - A single image. A group of one image opens alone. Previous, next, swipe, and arrow keys do not advance it. Pinch-zoom still works.
groupAttribute. Optionalinit()setting whendata-lightbox-groupis already in use. The default name isdata-lightbox-group.
Unchanged
Triggers without data-lightbox-group still share one gallery. data-lightbox is still the full-size image URL. Call init() once.
<img src="hero-thumb.jpg" data-lightbox="hero.jpg" data-lightbox-group="hero" alt="Hero">
<div data-lightbox-group="trip">
<img src="a-thumb.jpg" data-lightbox="a.jpg" alt="Stop one">
<img src="b-thumb.jpg" data-lightbox="b.jpg" alt="Stop two">
</div>npm install litelight-js@1.3.0