Results 1 to 3 of 3

Thread: loading Step Carousel Viewer in middle of carousel

  1. #1
    Join Date
    Dec 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question loading Step Carousel Viewer in middle of carousel

    1) Script Title: Step Carousel Viewer

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...epcarousel.htm

    3) Describe problem:
    I need to load the script (when a visitor first comes to the page) starting in the middle of the series of images, so there are a certain number of images to the left and the rest still to the right.

    Seems like a simple thing to do, but I don't know javascript well and am hoping someone can point out what to change to make this happen. Thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    9,887
    Thanks
    3
    Thanked 963 Times in 952 Posts
    Blog Entries
    15

    Default

    Well, you could use the oninit event of the script to go to a specific slide to start when the Carousel loads. For example:

    Code:
    <script type="text/javascript">
    
    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:false, persist:true},
    	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 ['external', 'path_to_external_file']
    	oninit:function(){
    		stepcarousel.stepTo('mygallery', 2) //go to 2nd slide to begin with
    	}
    })
    
    </script>
    The only issue with this is that if you're setting your Carousel to auto slide, by manually calling stepTo(), it stops the Carousel at the same time. If you are using auto step and need a workaround, let me know.
    DD Admin

  3. #3
    Join Date
    Dec 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks! i'm not using autostepping, so this works just right.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •