mlightbox-js
v0.1.0
Published
A Micro lightbox gallery without dependencies
Downloads
2
Maintainers
Readme
mlightbox.js
Micro lightbox gallery without dependencies.
View a Demo
How to use?
Installation
Using npm:
npm install mlightbox-js
Or download the latest release
Usage:
- Include the CSS at the top of your page in
<head>
tag:
<link rel="stylesheet" href="path/to/mlightbox.min.css">
- Include the Javascript at the bottom of your page before the closing
</body>
tag:
<script src="path/to/mlightbox.min.js"></script>
The markup
Add a mlightbox
attribute in each image link to enable the gallery. For example:
<div>
<a href="path/to/image-1.jpg" mlightbox></a>
<a href="path/to/image-2.jpg" mlightbox></a>
<a href="path/to/image-3.jpg" mlightbox></a>
<a href="path/to/image-4.jpg" mlightbox></a>
</div>