Utilizes Bootstraps modal plugin to implement a lightbox gallery - GitHub
Obviously, you need the modal component that comes with Bootstrap, and jQuery.
<a href="someurl" data-toggle="lightbox">Launch modal</a>
<a href="someurl" id="mylink">Open lightbox</a>
$('#mylink').lightbox(options);
Name | type | default | description |
---|---|---|---|
source | string | If you can't/don't want to set the href property of an element, use data-source="something" |
|
gallery | string | For grouping elements |
Images taken from Instagrams "The Week on Instagram | 92"
Gallery images must be wrapped in a tag (probably <div>
) - which doesn't have the class .row
. This is so you can create columns/rows.
Note how the final image is not in the gallery intentionally.
data-source
All examples on this page are this example. Too high images don't count, scrolling works fine with the original modal.