Javascript dropdown menu only works on first-child
Permalink
I am building this site in Concrete5 5.7.5.6 using Pure CSS as a framework.
http://whitesvillewv.com/
For some reason, the javascript dropdown submenus in my autonav only work properly for the first-child (in this case, the "Experience" nav item). If I enable hover, I can see the other two dropdown menus when I hover over their parent ("Our Town" and "Resources"), but I can not click on them to expand and close the dropdown without navigating to the top level page. I do not have disable_link_in_nav or replace_link_with_first_in_nav enabled for any of the pages. I can't understand why the first-child (of Home) is working the way I'd like it to, but the other children are not. I've checked everything I can think of to ensure they have the same settings/attributes. Whichever page I move to the first-child position works fine, but if I move that page to any other position, the dropdown stops working. Below is the Javascript I'm using to enable dropdowns:
Can anybody tell me what I'm missing in order to make all of the nav items with a submenu show a dropdown on click without navigating to a page?
Thanks!
http://whitesvillewv.com/
For some reason, the javascript dropdown submenus in my autonav only work properly for the first-child (in this case, the "Experience" nav item). If I enable hover, I can see the other two dropdown menus when I hover over their parent ("Our Town" and "Resources"), but I can not click on them to expand and close the dropdown without navigating to the top level page. I do not have disable_link_in_nav or replace_link_with_first_in_nav enabled for any of the pages. I can't understand why the first-child (of Home) is working the way I'd like it to, but the other children are not. I've checked everything I can think of to ensure they have the same settings/attributes. Whichever page I move to the first-child position works fine, but if I move that page to any other position, the dropdown stops working. Below is the Javascript I'm using to enable dropdowns:
(function (window, document) { 'use strict'; // Enable drop-down menus in Pure // Inspired by YUI3 gallery-simple-menu by Julien LeComte // [https://github.com/yui/yui3-gallery/blob/master/src/gallery-simple-menu/js/simple-menu.js] function PureDropdown(dropdownParent) { var PREFIX = 'pure-', ACTIVE_CLASS_NAME = PREFIX + 'menu-active', ARIA_ROLE = 'role', ARIA_HIDDEN = 'aria-hidden', MENU_OPEN = 0, MENU_CLOSED = 1, MENU_PARENT_CLASS_NAME = 'pure-menu-has-children', MENU_ACTIVE_SELECTOR = '.pure-menu-active', MENU_LINK_SELECTOR = '.pure-menu-link',
Viewing 15 lines of 149 lines. View entire code block.
Can anybody tell me what I'm missing in order to make all of the nav items with a submenu show a dropdown on click without navigating to a page?
Thanks!