Basic Image Gallery & Lightbox Library – mlightbox.js

Category: Gallery , Javascript , Modal & Popup | May 19, 2017
Authorwelksonramos
Last UpdateMay 19, 2017
LicenseMIT
Tags
Views1,211 views
Basic Image Gallery & Lightbox Library – mlightbox.js

mlightbox.js is a very small JavaScript plugin for creating a responsive gallery where the users are able to display large images in a fullscreen modal window when clicked.

How to use it:

Load the necessary Stylesheet mlightbox.min.css and JavaScript mlightbox.min.js in the html document.

<link href="dist/mlightbox.min.css" rel="stylesheet">
<script src="dist/mlightbox.min.js"></script>

Add the required attribute ‘mlightbox’ to image links as these:

<a href="https://placeimg.com/640/480/people" mlightbox></a>
<a href="https://placeimg.com/640/480/tech" mlightbox></a>
<a href="https://placeimg.com/640/480/nature" mlightbox></a>
<a href="https://placeimg.com/640/480/animals" mlightbox></a>

That’s it.

You Might Be Interested In:


Leave a Reply