[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentytwentyone/assets/js/ -> primary-navigation.js (summary)

File primary-navigation.js. Required to open and close the mobile navigation.

File Size: 204 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions

  twentytwentyoneToggleAriaExpanded()
  twentytwentyoneCollapseMenuOnClickOutside()
  twentytwentyoneSubmenuPosition()
  twentytwentyoneExpandSubMenu()

Functions
Functions that are not part of a class:

twentytwentyoneToggleAriaExpanded( el, withListeners )   X-Ref
Toggle an attribute's value

param: {Element} el - The element.
param: {boolean} withListeners - Whether we want to add/remove listeners or not.
since: Twenty Twenty-One 1.0

twentytwentyoneCollapseMenuOnClickOutside( event )   X-Ref
No description

twentytwentyoneSubmenuPosition( li )   X-Ref
Changes the position of submenus so they always fit the screen horizontally.

param: {Element} li - The li element.
since: Twenty Twenty-One 1.0

twentytwentyoneExpandSubMenu( el )   X-Ref
Handle clicks on submenu toggles.

param: {Element} el - The element.
since: Twenty Twenty-One 1.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1