Hello there!
I am trying to implement Swipebox slider with CouchCMS gallery.
I was about to do it with PHP but wanted Couch syntax ago.
Basically what I need is get the Gallery (folder) and contents of a folder.
Two foreachs may solve my issue:)
And initiate the slider with this code (which I will generate dynamically as well)
I am trying to implement Swipebox slider with CouchCMS gallery.
I was about to do it with PHP but wanted Couch syntax ago.
Basically what I need is get the Gallery (folder) and contents of a folder.
Two foreachs may solve my issue:)
- Code: Select all
<!-- Gallery 1 -->
<a id="gallery-1" rel="gallery-1" href="big/image1.jpg" class="swipebox">
</a>
<a rel="gallery-1" href="big/image2.jpg" class="swipebox">
<img src="small/image2.jpg" alt="image">
</a>
<!-- Gallery 2 -->
<a rel="gallery-2" href="big/image3.jpg" class="swipebox">
<img src="small/image3.jpg" alt="image">
</a>
<a rel="gallery-2" href="big/image4.jpg" class="swipebox">
<img src="small/image4.jpg" alt="image">
</a>
And initiate the slider with this code (which I will generate dynamically as well)
- Code: Select all
$( '#gallery-1' ).click( function( e ) {
e.preventDefault();
$.swipebox( [
{ href:'big/image1.jpg', title:'My Caption' },
{ href:'big/image2.jpg', title:'My Second Caption' }
] );
} );