PDA

View Full Version : multiple instances of ultimate slide show (not working)



lauras2009
09-24-2009, 09:00 PM
1) Script Title: Ultimate Fade-in slide show v2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: I'm trying to create multiple instances of this slideshow (fadeshow1, fadeshow2) and use a different one for the different sections of my site. I can't get it working however. It only shows up on one of the pages (fadeshow1).

This is what I've got in the slideshowscript.js file:


var mygallery1=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [183, 234], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_ariel.jpg"],
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_coby.jpg"],
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_ezra.jpg"],
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_ca1.jpg"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:6000, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 1500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})

var mygallery2=new fadeSlideShow({
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
dimensions: [183, 234], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_bball1.jpg"],
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_int1.jpg"],
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_rafael.jpg"],
["http://jcdsboston.localweb.com/dev/wp-content/themes/JCDS-theme/images/inside/photos/photo_ravyoel.jpg"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:6000, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 1500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""

...etc ... (There are 7 of them but this is the first 2.)

When I call the different ones, I'm using


<div id="fadeshow1"></div> or fadeshow2, etc ...

but only the first one, fadeshow1, is working.

Can anybody help?

Thank you very much,

Laura S.

lauras2009
09-24-2009, 11:34 PM
It looks like I can have two different instances on the same page (fadeshow1, fadeshow2), but not on different pages. Does anybody have any insight on this or how to fix it? I suppose I could make 7 totally separate sets of files (one for each section) but that seems kind of excessive ...

lauras2009
09-25-2009, 04:40 PM
I just divided up the slideshowscript.js file into separate slide shows and put each one on its own page (template) and that seems to be working ... yay

Laura S.

ddadmin
09-25-2009, 11:57 PM
Hmm I don't see why you can't have multiple instances of the same script on the same page, let alone different pages. If you're still having issues with this, please post a link to the problem page and instructions on seeing the error.