Results 1 to 6 of 6

Thread: Need to Change the Way Accordion Menu Links Behave

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

    Default Need to Change the Way Accordion Menu Links Behave

    Glossy Accordion Menu

    http://www.dynamicdrive.com/dynamici...enu-glossy.htm

    OnClick, I want the top-level text links, the ones with the [+] box before them, to not only open the accordion but to forward the user to the URL in the <a...> tag wrapped around them. but I want the [+] box to instead control the accordion feature but NOT forward the user to another page.

    In other words, on http://www.borderstogo.com/ if the user clicks the BUNDLE LOTS text link, I want that to take the user to http://www.borderstogo.com/bundlelots.html AND open the accordion DIV below BUNDLE LOTS. If the user clicks the [+] box, I want to open the accordion div, but NOT change the page.

    Can this be done?


    the controlling styles are at the bottom of http://www.borderstogo.com/css-edits.css
    Last edited by ETpro; 09-01-2010 at 03:57 PM.

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

    Default

    Bump, Is this even possible? If I contract with a programmer to do it, am I looking at something simple or a complete do-over?

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

    Default

    Ok, try the below modified .js file, which should do it.
    DD Admin

  4. #4
    Join Date
    Jun 2009
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Ok, try the below modified .js file, which should do it.
    I swapped this for what was there. Doesn't change the behavior at all. The text links still roll the accordion down, but won't go to the URL they are aimed at. That's kind of a killer for this site, because those are all top-level section pages, and this leaves them unreachable. Seems like this would be an important feautre to have for the Accordion Menu.

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

    Default

    The "revealtype" setting should be set to "clickgo":

    Code:
      <script type="text/javascript">
      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='/lib/yhst-68986320726817/bullet-more.gif' class='statusicon' />", "<img src='/lib/yhst-68986320726817/bullet-less.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
      	}
      })
      </script>
    DD Admin

  6. #6
    Join Date
    Jun 2009
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    The "revealtype" setting should be set to "clickgo":
    Doh! I should have realized that. It works fine now. Thanks.

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
  •