@kanety/jquery-simple-lightbox
v0.2.0
Published
A jquery plugin for simple lightbox
Downloads
1
Readme
jquery-simple-lightbox
A jquery plugin for simple lightbox.
Dependencies
- jquery
Installation
Install from npm:
$ npm install @kanety/jquery-simple-lightbox --save
Usage
Build file input field:
<div id="gal">
<a href="img1.png" rel="lightbox" title="img1.png"><img src="img1_thumb.png"></a>
<a href="img2.png" rel="lightbox" title="img2.png"><img src="img2_thumb.png"></a>
<a href="img3.png" rel="lightbox" title="img3.png"><img src="img3_thumb.png"></a>
</div>
Then run:
$('#gal').simpleLightbox();
Options
Change link selector:
$('#gal').simpleLightbox({
links: 'a[rel="lightbox"]'
});
Change lightbox owner:
$('#gal').simpleLightbox({
owner: 'body'
});
Change image extensions:
$('#gal').simpleLightbox({
imageExt: /^(jpg|jpeg|png|gif|bmp|webp)$/
});
License
The library is available as open source under the terms of the MIT License.