npm install mlightbox-js
Download directly from Github
Include the CSS at the top of your page in your <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>
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>