View Full Version : Step Carousel Viewer - customizing the viewer

02-09-2013, 02:03 AM
1) Script Title: Step Carousel Viewer

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

3) Describe problem:

Is there any way to have the viewer start at the 2nd panel (or any besides the first), and then CENTER the panel rather than having it aligned to the left of the belt?

02-12-2013, 07:24 PM
Getting the carousel to start at a particular panel is simple enough. You would just call the stepTo() method of the script. You'll also want to do this when the carousel has loaded fully, which can be done by calling any code inside the oninit event handler:

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:false, wrapbehavior:'slide', persist:false},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.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']
stepcarousel.stepTo('mygallery', 2) // step to 2nd panel

Regarding the 2nd part of your question, there's no easy way to have a panel aligned anything but to the left of the container unfortunately, as those are the built in stopping points of each panel.