I think it should be fine. It's not like you're loading up a bunch of code. Almost everything is reused. If the images are few and small and also reused, it should be OK. It could be written a little more concisely though since everything is the same except for the different wrapperid's and durations:
Code:
<script type="text/javascript">
fadeSlideShow.makeGalObj = function(obj){
obj = obj || {};
var defaults = {
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [30, 30], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["images/blank1.jpg"],
["images/star.jpg"],
["images/blank1.jpg"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:1000, cycles:0, wraparound:false, randomize:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 200, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
}
return jQuery.extend({}, defaults, obj);
};
var mygallery=new fadeSlideShow(fadeSlideShow.makeGalObj());
var mygallery2=new fadeSlideShow(fadeSlideShow.makeGalObj({
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
displaymode: {type:'auto', pause:1500, cycles:0, wraparound:false, randomize:false},
fadeduration: 350 //<--no trailing comma after very last custom property!
));
var mygallery3=new fadeSlideShow(fadeSlideShow.makeGalObj({
wrapperid: "fadeshow3", //ID of blank DIV on page to house Slideshow
displaymode: {type:'auto', pause:900, cycles:0, wraparound:false, randomize:false},
fadeduration: 150 //<--no trailing comma after very last custom property!
));
</script>
Untested, but should work. You can have as many different ones as you like. I changed randomize to false because I don't think it's getting you anything, at least not anything good. I could be wrong on that. If the two 'blank' images are the same, you only need one.
If you want more help:
Please post a link to a page on the web that contains the problematic code so we can check it out.
Bookmarks