Ask questions and get good answers on mb.jQuery.components

Hi,

First of all, great gallery, really really nice.

I'm a super beginner here, but I just wanted to know if it is possible to make the gallery appear directly on the page without having to click on a button?

Thanks

asked May 02 '11 at 17:09

Bossun's gravatar image

Bossun
111


Hi, Of course you can; as you can see in the demo file the gallery is invoked via an on click event but you can use the same constructor to run the gallery once the page is loaded:

Just write as follow inside the document ready ($(function(){...})) of SCRIPT tag on the header of your page:

<script type="text/javascript">
   $(funtion(){
     $('#g1').mbGallery({maskBgnd:'#ccc',minWidth: 50, minHeight: 50, overlayOpacity:.9, addRaster:true, printOutThumbs:true});
   });
</script>

This way the gallery will start once the page is loaded.

Bye, Matteo

answered May 04 '11 at 18:10

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Your answer
toggle preview

jQuery main site - Matteo Bicocchi