We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12147
    • 182 Posts
    I have checked this many times but must be missing something obvious (this is from the excellent Wayfinder ebook). Menu does not close, at all: whole menu is open. Styling present. Js issue?

    1.Uploaded menu.js, jQuery, and jquery.cookie.js into js folder, linked in head:

    <script src=”assets/js/jquery-1.3.2.min.js” type=”text/javascript” ></script>
    <script src="assets/js/jquery.cookie.js" type="text/javascript"></script>
    <script src="assets/js/menu.js" type="text/javascript" ></script>

    2.Created Wayfinder chunks: [note: tried this chunk with and without <div id="leftnav"></div>, no diff]

    {{accordionContainer}}
    <div id="leftnav">
    <ul id="menu" class="menu collapsible">[+wf.wrapper+]</ul>
    </div>


    {{accordionInnerContainer}}
    <ul [+wf.classes+]>[+wf.wrapper+]</ul>


    {{accordionRows}}
    <li [+wf.classes+] >
    <a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>
    [+wf.wrapper+]
    </li>


    3. Wayfinder call:
    [[Wayfinder? &startId=`0` &level=`2` &outerTpl=`accordionContainer` &rowTpl=`accordionRows`
    &innerTpl=`accordionInnerContainer` &excludeDocs=`31, 32, 30`]]


    I would greatly appreciate any help with this! I’m just not seeing the problem. huh
    [forgot: using MODx Evo]
      • 4971
      • 964 Posts
      Aren’t there any behaviour setting on menu.js that you can change?
        Website: www.mercologia.com
        MODX Revo Tutorials:  www.modxperience.com

        MODX Professional Partner
        • 12147
        • 182 Posts
        The function of this is determined by the class given to the holder div, which I believe then determines what .js effect is created. I think it’s all there as it should be...
          • 4971
          • 964 Posts
          I was asking, because I use another way to do accordions and in the js file
          I can set up if I want it to be all open at the beginning, or all closed, or
          one item open, or open at mouseover, or open at mouse click, etc.

          Thought that your js file would have the same... good luck...
            Website: www.mercologia.com
            MODX Revo Tutorials:  www.modxperience.com

            MODX Professional Partner