[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/ -> admin-bar.js (summary)

(no description)

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

Defines 12 functions

  removeHoverIfEscape()
  toggleHoverIfEnter()
  focusTargetAfterEnter()
  mobileHover()
  clickShortlink()
  emptySessionStorage()
  hasClass()
  addClass()
  removeClass()
  removeAllHoverClass()
  scrollToTop()
  getClosest()

Functions
Functions that are not part of a class:

removeHoverIfEscape( event )   X-Ref
Remove hover class for top level menu item when escape is pressed.

since: 5.3.1
param: {Event} event The keydown event.

toggleHoverIfEnter( event )   X-Ref
Toggle hover class for top level menu item when enter is pressed.

since: 5.3.1
param: {Event} event The keydown event.

focusTargetAfterEnter( event )   X-Ref
Focus the target of skip link after pressing Enter.

since: 5.3.1
param: {Event} event The keydown event.

mobileHover( topMenuItems, event )   X-Ref
Toogle hover class for mobile devices.

since: 5.3.1
param: {NodeList} topMenuItems All menu items.
param: {Event} event The click event.

clickShortlink( event )   X-Ref
Handles the click on the Shortlink link in the adminbar.

since: 3.1.0
since: 5.3.1 Use querySelector to clean up the function.
return: {boolean} Returns false to prevent default click behavior.
param: {Event} event The click event.

emptySessionStorage()   X-Ref
Clear sessionStorage on logging out.

since: 5.3.1

hasClass( element, className )   X-Ref
Check if element has class.

since: 5.3.1
return: {bool} Whether the element has the className.
param: {HTMLElement} element The HTML element.
param: {String}      className The class name.

addClass( element, className )   X-Ref
Add class to an element.

since: 5.3.1
param: {HTMLElement} element The HTML element.
param: {String}      className The class name.

removeClass( element, className )   X-Ref
Remove class from an element.

since: 5.3.1
param: {HTMLElement} element The HTML element.
param: {String}      className The class name.

removeAllHoverClass( topMenuItems )   X-Ref
Remove hover class for all menu items.

since: 5.3.1
param: {NodeList} topMenuItems All menu items.

scrollToTop( event )   X-Ref
Scrolls to the top of the page.

since: 3.4.0
return: {void}
param: {Event} event The Click event.

getClosest( el, selector )   X-Ref
Get closest Element.

since: 5.3.1
param: {HTMLElement} el Element to get parent.
param: {string} selector CSS selector to match.



Generated: Tue Feb 18 01:00:03 2020 Cross-referenced by PHPXref 0.7.1