Last active
December 14, 2015 08:08
-
-
Save fnordo/5055079 to your computer and use it in GitHub Desktop.
Simply use the HTML-markup and you should be good to go...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="da-slide"> | |
<h2>Heading</h2> | |
<p>Lorem ipsum foobar...</p> | |
<!-- Image-Wrapper: | |
- Create a container with class 'gallery' | |
- Put your gallery-imgs inside ;) ... --> | |
<div class="gallery"> | |
<!-- a.da-link triggers lightbox-gallery... --> | |
<a href="path/to/img-1.jpg" class="da-link lightbox"></a> | |
<a href="path/to/img-2.jpg"></a> | |
... | |
<a href="path/to/img-N.jpg"></a> | |
</div> | |
<div class="da-img"> | |
<img src="path/to/thumb.png" alt="" /> | |
</div> | |
</div> | |
<!-- ... more slides... --> | |
<script type="text/javascript"> | |
$(function() { | |
// some code... | |
/* | |
* Initialize galleries. | |
* | |
* How it works: | |
* We select all elements with class 'gallery'. | |
* Iterate over the set of elements and apply the lightbox-plugin on each element. | |
*/ | |
$('.gallery').each(function(i) { // select all .gallery-elements | |
$('a', this).lightBox(); // for each element, initialize the lightBox-plugin | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment