Package Exports
- lity
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lity) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Lity
Lity is a ultra-lightweight and responsive lightbox plugin which supports images, iframes and inline content out of the box.
Minified and gzipped, its total footprint weights about 2kB.
It works with jQuery and Zepto.
If you need to be compatible with IE8, use the es5-shim.
Installation
Include the Lity javascript and css files and its dependencies in your HTML document (if your using Lity with image links, imagesLoaded is required):
<link href="dist/lity.css" rel="stylesheet">
<!-- Remove the following line if you do not need IE8 support -->
<!--[if lt IE 9]><script src="lib/es5-shim.js"></script><![endif]-->
<script src="lib/jquery.js"></script>
<script src="lib/imagesloaded.pkgd.js"></script>
<script src="dist/lity.js"></script>
Usage
Add the data-lity
attribute to <a>
elements for which you want the links to
be opened in a lightbox:
<a href="https://farm9.staticflickr.com/8642/16455005578_0fdfc6c3da_b.jpg" data-lity>Image</a>
<a href="#inline" data-lity>Inline</a>
<a href="//www.youtube.com/watch?v=XSGBVzeBUbk" data-lity>iFrame Youtube</a>
<a href="//vimeo.com/1084537" data-lity>iFrame Vimeo</a>
<a href="//maps.google.com/maps?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA" data-lity>Google Maps</a>
<div id="inline" style="background:#fff" class="lity-hide">
Inline content
</div>
License
Copyright (c) 2015 Jan Sorgalla. Released under the MIT license.