Reputation: 133
I'm trying to have Lightbox open a gallery of images from clicking on one thumbnail. When you click on it, you should then be able to scroll through a couple of images. Here is my site: http://eta.terrellplace.com/terrell.php
I tried to follow this:
How to make a jquery lightbox open multiple images from one link?
Here is my HTML:
<div id="fit">
<div id='gallery'>
<a href="images/plans/LEVEL 6[23].jpg" title="" class="lightbox"><img src="images/plans/smallsuites-thumb.jpg" alt="" /></a>
<a rel="gallery" href="images/plans/LEVEL_3[25].jpg" title="" class="lightbox"></a>
<a rel="gallery" href="images/plans/LEVEL_2-_TECH[25].jpg" title="" class="lightbox"></a>
<a rel="gallery" href="images/plans/LEVEL_2_-_OFFICE[18].jpg" title="" class="lightbox"></a>
<a rel="gallery" href="images/plans/LEVEL_2_-_OFFICE[18].jpg" title="" class="lightbox"></a>
</div>
</div>
Here is the jQuery:
$(document).ready(function() {
$('#gallery a').lightBox({fixedNavigation:true});
$('#gallery a:gt(0)').hide();
});
Can someone tell me what I seem to be missing here.
Thanks
Upvotes: 1
Views: 1092
Reputation: 167182
You need to give a rel=""
attribute.
<a rel="gallery" href="images/plans/LEVEL 3[25].jpg" title="" class="lightbox"></a>
<a rel="gallery" href="images/plans/LEVEL 2- TECH[25].jpg" title="" class="lightbox"></a>
<a rel="gallery" href="images/plans/LEVEL 2 - OFFICE[18].jpg" title="" class="lightbox"></a>
<a rel="gallery" href="images/plans/LEVEL 2 - OFFICE[18].jpg" title="" class="lightbox"></a>
It's something strange to see file names having spaces in them. Don't use file names with spaces, when you are hosting it in the server.
Upvotes: 1