Results 1 to 5 of 5

Thread: Desperate to sort out problem with Step Carousel

  1. #1
    Join Date
    May 2010
    Posts
    15
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Desperate to sort out problem with Step Carousel

    1) Script Title: Step Carousel

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

    3) Describe problem: I'm having trouble ensuring that the step carousel panel matches the link from the drop-down menu at the top of the page. If you, say, browse through the rings (http://www.jacksdesign.co.uk/rings/e...3xdrops18Y.php) up to, for example, panel 5 and then select rings from the drop-down menu; the panel remains on panel 5 but open's the first page above.

    I need to sort this out, as it would be a bit confusing for someone browsing through the rings.

    This happens will all other pages containing the stepcarousel.

    Many thanks

    Vicky

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

    Default

    Sorry for the delay in getting back to your older thread. Ok, try augmenting your links within the drop down menu with the code in red:

    Code:
    <a href="target.htm" onClick="stepcarousel.configholder['mygallery'].currentpanel=0">dfdf</a>
    And change "mygallery" to the ID of your Carousel, in your case, "bottom". The value 0 int his case means to load the 1st panel. Altogether clicking on the link above loads the target page, then causes the 1st panel within the Carousel to be shown, instead of the last viewed persisted panel.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    vix (07-13-2010)

  4. #3
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    not sure this is what Vicky wants
    as the problem is pressing the browser back button

    best to define the set of rings to display when the page loads

    http://www.vicsjavascripts.org.uk/Demos/100701B.htm

    bit rough at the moment but maybe the DD script can be modified, I tried but seemed easier to make from new
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  5. The Following User Says Thank You to vwphillips For This Useful Post:

    vix (07-13-2010)

  6. #4
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    The value 0 int his case means to load the 1st panel.
    not sure this is what Vicky wants
    as the problem is pressing the browser back button

    best to define the set of rings to display when the page loads

    http://www.vicsjavascripts.org.uk/Demos/100701B.htm

    bit rough at the moment but maybe the DD script can be modified, I tried but seemed easier to make from new
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  7. The Following User Says Thank You to vwphillips For This Useful Post:

    vix (07-13-2010)

  8. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your problem arises because the step carousel is remembering where it was, but the content above the carousel is not.

    The carousel does this with cookies. It would probably be a bad idea to disable that because then, when you get to a sub page for a specific ring, the carousel would then be in the wrong place. It wouldn't make sense to remember the page you were on, because then clicking on rings would do nothing, though that could be arranged and might be a better solution, depending upon your personal preference. Let me know.

    What we can to do is prevent the carousel from reacting to the cookie, but only on 'home' ring page:

    http://www.jacksdesign.co.uk/rings/e...3xdrops18Y.php

    To do that, replace this on that page only:

    Code:
    <script language="JavaScript" src="../../js/stepcarousel_03.js" type="text/javascript"></script>
    with:

    Code:
    <script type="text/javascript">
    stepcarousel.setup({
            galleryid: 'bottom', //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:false, moveby:1, pause:3000},
            panelbehavior: {speed:500, wraparound:false, persist:false, scrolling:false},
            defaultbuttons: {enable: true, moveby: 8, leftnav: ['../../images/arrow_left.gif', 10, 80], rightnav: ['../../images/arrow_right.gif', -30, 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']
            oninit: function(){
            	var config = stepcarousel.configholder['bottom'];
            	jQuery(window).unbind('unload');
            	jQuery(window).bind('unload', function(){ //clean up on page unload and set cookie
    			stepcarousel.resetsettings($, config);
    			stepcarousel.setCookie(config.galleryid+"persist", config.currentpanel);
    			jQuery.each(config, function(ai, oi){
    				oi=null;
    			})
    			config=null;
    		});
            }
    })
    </script>
    Last edited by jscheuer1; 07-07-2010 at 10:03 PM. Reason: best of both worlds
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. The Following User Says Thank You to jscheuer1 For This Useful Post:

    vix (07-13-2010)

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
  •