Visual LightBox
To run the lightbox css3 autoplay
Q: Dear Support,
I'm using a number of your software programs.
Question - In Visual Lightbox I would like for the slideshow to begin automatically when the Gallery first comes up, without a visitor having to click on a thumbnail to start it. How to i do I code this?
A: You can start lightbox popup 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>