Results 1 to 3 of 3

Thread: Step Carousel Viewer

  1. #1
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Step Carousel Viewer

    1) Script Title: Step Carousel Viewer

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

    3) Describe problem: I'm using this script on a website using various images. I want to specify which image is shown when the page loads. This could change weekly as new images are added. I have 2 viewers (with different id's) on the page. Can anyone suggest the code I need to add in order to achieve this. I think in involves an "onload" event along with a "stepto" function, but I can't get the coding right. Any help appreciated.
    Last edited by Snookerman; 06-25-2009 at 08:50 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Yep, you're on the right track. To get the script to go to a particular panel when the page loads, you'd do something like:

    Code:
    <script type="text/javascript">
    
    stepcarousel.setup({
    galleryid: 'galleryC', //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
    panelbehavior: {speed:300, wraparound:false, persist:true},
    defaultbuttons: {enable: true, moveby: 1, leftnav: ['arrowl.gif', -10, 100], rightnav: ['arrowr.gif', -10, 100]},
    statusvars: ['imageA', 'imageB', 'imageC'], //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('galleryC', 2)
     }
    })
    
    </script>
    Where "galleryC" above should be the ID of your gallery, and 2 means go to the 2nd panel.
    DD Admin

  3. #3
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks - works a treat.

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
  •