Awesome
vanilla-lightbox
powered by vanilla.js
🔨 Create simple lightbox gallery.
Preview 🎉
https://piecioshka.github.io/vanilla-lightbox.js/demo/
Usage
-
In HTML file attach files
src/lightbox.css
andsrc/lightbox.js
. -
In HTML file:
<a href="https://example.com/link-1" rel="lightbox"> <img src="image-1.jpg" alt="example text" /> </a> <a href="https://example.com/link-2" rel="lightbox"> <img src="image-2.jpg" alt="example text 2" /> </a>
-
Run this JavaScript code, when DOM is ready:
new LightBox();
Options
rel {string}
Define this attribute in item which should display in lightbox.
prev {string}
Label of button which display previous image.
next {string}
Label of button which display next image.
Support
- Google Chrome
- Mozilla Firefox
- Opera
- Safari
- <del>Internet Explorer</del>
Acknowledge
lightbox - light (white) container centered above dark background.
License
The MIT License @ 2013