Results 1 to 7 of 7

Thread: onopenclose of accordian menu

  1. #1
    Join Date
    Feb 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default onopenclose of accordian menu

    Glossy Accordion Menu Script

    http://dynamicdrive.com/dynamicindex...enu-glossy.htm

    I am trying to modify the script to expand the accordion menu and navigate to the corresponding URL when a menu header is clicked. I know this will involve the onopenclose event, but I am not sure how to make it redirect to the new URL.

    Example: http://www.wegoplaces.com/FLOrlando_Region_40.aspx
    If you click on "Things to do", it should expand the accordion and go to http://www.wegoplaces.com/FLOrlando_...ctivities.aspx and leave the accordion menu open

    Thanks!

    Jeff

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

    Default

    Try making the changes in red to the initialization code of your accordion menu on the affected pages:

    Code:
    ddaccordion.init({
    	headerclass: "submenuheader", //Shared CSS class name of headers group
    	contentclass: "submenu", //Shared CSS class name of contents group
    	revealtype: "clickgo", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
    	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
    	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
    	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    	animatedefault: false, //Should contents open by default be animated into view?
    	persiststate: true, //persist state of opened contents within browser session?
    	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    	togglehtml: ["suffix", "<img src='http://www.WeGoPlaces.com/User%20Interface/Images/plus.gif' class='statusicon' />", "<img src='http://www.WeGoPlaces.com/User%20Interface/Images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
    	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
    		//do nothing
    	},
    	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    		//do nothing
    	}
    })
    DD Admin

  3. #3
    Join Date
    Feb 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It's better but still flickers. On a click, it expands the menu, then navigates to a new page with a collapsed menu, then expands the menu again.

    Is there any way to skip the first expansion? IE - navigate, then expand?

    Thanks,

    Jeff

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

    Default

    With the changes the behavior should now be: click, expand, then navigate to the new page with the menu header in question already expanded (not collapsed initially before expanding again on the new page). Is this not the case for you?
    DD Admin

  5. #5
    Join Date
    Feb 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No - that is not the case. It clicks, expands, navigates to page with collapsed menu, then expands.

    I will have an example posted this evening.

  6. #6
    Join Date
    Feb 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here is the link: http://www.l-com.com

  7. #7
    Join Date
    Feb 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Anyone?

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
  •