Visual LightBox
Trying to have free html slideshow open automatically when someone goes to the home page
Q: I am trying to have one image open automatically when someone goes to the home page of a website. I want the corner image to auto expand to the centre of the screen at LOAD.
I am using a MAC with VisualLightbox 5.0 (FREE DEMO).
I would like to purchase this as long as I could have that function working. I have tried checking off Auto Play Slide Show....but it hasn¹t made a difference.
A: You can start lightbox gallery on page load:
1. Set the following function in the <head> tag of your page:
<script type="text/javascript">
var started;
function showLightBox()
{
if (started) return;
started = setTimeout(function(){
Lightbox.start(document.getElementById('firstImage'));
started;
},500);
}
</script>
2. Specify the onLoad event for the <body> tag:
<body bgcolor="#ffffff" onLoad="javascript:showLightBox()">
3. Set the ID for any image in your gallery (id="firstImage"),
for example add it to the second image:
<a class="vlightbox1" href="data/images1/10.jpg" title="10" id="firstImage">
<img src="data/thumbnails1/10.jpg" alt="10"/>
</a>