You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Uses event delegation to handle events for improved performance, and data attributes for targeting elements
8
8
* Also manages button for toggling navigation on mobile
9
9
*
10
-
* @param {Element} menu - the top level navigation <ul>
10
+
* @param {Element} menu - the top level <ul> navigation
11
11
* @param {Object} options - configuration options for the navigation
12
12
* @param {number} [options.breakpoint=1024] - pixel value at which the button for toggling the mobile navigation is hidden. Is converted to em (assumes 16px browser default).
13
-
* @param {boolean} [options.cloneTopLevelLink=true] - whether to copy the link to be replaced with a button and add it to the sub menu.
13
+
* @param {boolean} [options.cloneTopLevelLink=true] - whether to copy the link that will be replaced with a button, and add it to the sub menu.
14
+
* @param {boolean} [options.replaceTopLevelLinks=true] - whether to swap the top level link for a button, or add a button after the link
14
15
* @param {string} [options.mobileIcon] - SVG icon used for the button to show/hide the navigation on mobile.
15
16
* @param {string} [options.submenuIcon] - SVG icon used for sub menus and back button.
16
17
* @param {string} [options.submenuDirection=vertical] - direction in which sub menus operate on mobile (vertical, or horizontal with a 'back' button).
17
18
* @param {boolean} [options.submenuIntro=false] - whether the sub menu includes introductory text.
0 commit comments