2.
<script type="text/javascript" src="js/prototype.js"></script>
3.
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
4.
<script type="text/javascript" src="js/lightbox_s.js"></script>
5.
<script type="text/javascript" src="js/swfobject.js"></script>
7.
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
prevlabel.gif
and nextlabel.gif
files are in the right location. Also, make sure the loading.gif
and close1.gif
files as referenced near
the top of the lightbox_s.js
file are in the right location.rel="lightbox"
attribute to any link tag to activate the lightbox. For example: 2.
<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
Optional: Use the title
attribute if you want to show a caption.
<a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
<a href="images/image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
<a href="images/image-3.jpg" rel="lightbox[roadtrip]">image #3</a>
If you want to show just the link to the first image of your slideshow, you can do it like that:
<a href="images/image-1.jpg" rel="lightbox[roadtrip]">slideshow</a>
<a href="images/image-2.jpg" rel="lightbox[roadtrip]"></a>
<a href="images/image-3.jpg" rel="lightbox[roadtrip]"></a>
There is additional attributes available for the first image in slideshow:
startslideshow="false" – by default lightbox starts slideshow. Set it to false if you want to override this behavior.
forever="true" – by default slideshow runs only once. Set it to true if you want to override this behavior.
slideDuration="5" – the default slide duration is 3 sec. Set it to any number if you want to override it for particalar slideshow.
music="song.mp3” – URL to mp3 file for slideshow music
<a href="images/image-1.jpg" startslideshow=”true” forever=”false” slideDuration=”5” rel="lightbox[bday]">slideshow</a>
No limits to
the number of image sets per page or how many images are allowed in each set.
Go nuts!