
Originally Posted by
kunwarbs
Yes, I did mean that. any clue how to do that?
There are a few ways to go about this. You can use the navigate() method and call it inside the oninit() event to go to the desired slide when the gallery has fully loaded. For example, the below goes to the 2nd slide automatically when the gallery loads:
Code:
var mygallery=new simpleGallery({
wrapperid: "simplegallery", //ID of main gallery container,
dimensions: [400, 265], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["amster1.jpg", "http://en.wikipedia.org/wiki/Summer", "_new", ""],
["amster2.jpg", "http://en.wikipedia.org/wiki/Winter", "", ""],
["amster3.jpg", "", "", ""],
["amster4.jpg", "", "", ""]
],
autoplay: [false, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: true,
fadeduration: 1000, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
},
onslide:function(curslide, i){ //event that fires after each slide is shown
mygallery.navigate(1)
}
})
Bookmarks