PDA

View Full Version : Simple Controls Gallery



emanuelle
02-02-2011, 07:15 AM
1) Script Title:Simple Controls Gallery


2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery_suppliment.htm

3) Describe problem:
I am using the script here for example

http://www.alexis-html.com/ram/publications_bagage.html

is it possible to set by default whenever you go to a specific work, you start seeing it from the 1st image (when i go to various works, i always found myself, where i was last)

thank you

azoomer
02-02-2011, 07:25 AM
try setting the persist state to false


persist: false,

and see if that helps

emanuelle
02-02-2011, 10:33 AM
on what line?

azoomer
02-02-2011, 11:38 AM
on line 34

see the line below highlighted i red


<script type="text/javascript">
var mygallery=new simpleGallery({
wrapperid: "simplegallery", //ID of main gallery container,
dimensions: [950, 540], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["images/publications/baggage/cover01.jpg", "", "", ""],
["images/publications/baggage/spread01.jpg", "", "", ""],
["images/publications/baggage/spread02.jpg", "", "", ""],
["images/publications/baggage/spread03.jpg", "", "", ""],
["images/publications/baggage/spread04.jpg", "", "", ""],
["images/publications/baggage/spread05.jpg", "", "", ""],
["images/publications/baggage/spread06.jpg", "", "", ""],
["images/publications/baggage/spread07.jpg", "", "", ""],
["images/publications/baggage/spread08.jpg", "", "", ""],
["images/publications/baggage/spread09.jpg", "", "", ""],
["images/publications/baggage/spread10.jpg", "", "", ""],
["images/publications/baggage/spread11.jpg", "", "", ""]
],
autoplay: [0], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: false,
fadeduration: 1000, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
var sg = this;
sg.setting.$gallerylayers.css({cursor: 'pointer'}).attr('title', 'Next').click(function(e){
e.preventDefault();
sg.navigate('next');
});

},
onslide:function(curslide, i){ //event that fires after each slide is shown
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}
})

</script>