You don't need to edit the javascript. As Beverley says, you need to setup the on page init of the gallery with the properties that you want, for example:
Code:
stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:true, moveby:1, pause:3000},
panelbehavior: {speed:500, wraparound:true, wrapbehavior:'slide', persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['leftnav.gif', -5, 80], rightnav: ['rightnav.gif', -20, 80]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})
The only thing you cannot setup there is to have it keep going after one of the nav or page images is clicked. To do that, add right after the on page init:
Code:
jQuery(function($){
var mygal = stepcarousel.configholder.mygallery, $page = mygal.$paginatediv, $nav = mygal.$leftnavbutton.add(mygal.$rightnavbutton).add($page.find('img'));
$nav.click(function(){
mygal.steptimer=setInterval(function(){stepcarousel.autorotate(mygal.galleryid)}, mygal.autostep.pause);
});
});
Notice the red mygallery in both of these. It's the id of the gallery and must be the same in both places.
Demo:
http://home.comcast.net/~jscheuer1/s...ousel/demo.htm
Use your browser's "View Source" to get the code.
Any questions, feel free to ask.
One thing this script cannot do though is move continuously from the last image to the first image. Well it can and does, but you might be thinking in terms of advancing to the first image. What it does is rewind to the first image. If you want a continuously advancing script, you would either need a (probably major) rewrite of this script or another script. There probably already is another script that does that. I'm just not sure which one(s) are available that do that.
But if you don't mind the rewind motion from last to first, after all it's what this script does, you're all set.
Bookmarks