Is it possible to load automatically open the image gallery for website upon opening the page?

Q: Is it possible to load automatically open the image gallery for website upon opening the page?

A: You can start image gallery for website 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>

Related