[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentynineteen/js/ -> touch-keyboard-navigation.js (summary)

Touch & Keyboard navigation. Contains handlers for touch devices and keyboard navigation.

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

Defines 10 functions

  debounce()
  addClass()
  deleteClass()
  hasClass()
  toggleAriaExpandedState()
  openSubMenu()
  closeSubMenu()
  getCurrentParent()
  removeAllFocusStates()
  toggleSubmenuDisplay()

Functions
Functions that are not part of a class:

debounce(func, wait, immediate)   X-Ref
Debounce.

param: {Function} func
param: {number} wait
param: {boolean} immediate

addClass(el, cls)   X-Ref
Add class.

param: {Object} el
param: {string} cls

deleteClass(el, cls)   X-Ref
Delete class.

param: {Object} el
param: {string} cls

hasClass(el, cls)   X-Ref
Has class?

param: {Object} el
param: {string} cls
returns: {boolean} Has class

toggleAriaExpandedState( ariaItem )   X-Ref
Toggle Aria Expanded state for screenreaders.

param: {Object} ariaItem

openSubMenu( currentSubMenu )   X-Ref
Open sub-menu.

param: {Object} currentSubMenu

closeSubMenu( currentSubMenu )   X-Ref
Close sub-menu.

param: {Object} currentSubMenu

getCurrentParent( child, selector, stopSelector )   X-Ref
Find first ancestor of an element by selector.

param: {Object} child
param: {String} selector
param: {String} stopSelector

removeAllFocusStates()   X-Ref
Remove all off-canvas states.


toggleSubmenuDisplay()   X-Ref
Toggle `focus` class to allow sub-menu access on touch screens.




Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref