[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

(no description)

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

Defines 11 functions

  removeHoverIfEscape()
  toggleHoverIfEnter()
  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.

param: {Event} event The keydown event.

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

param: {Event} event The keydown event.

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

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.

param: {Event} event The click event.
return: {boolean} Returns false to prevent default click behavior.

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


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

param: {HTMLElement} element The HTML element.
param: {string}      className The class name.
return: {boolean} Whether the element has the className.

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

param: {HTMLElement} element The HTML element.
param: {string}      className The class name.

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

param: {HTMLElement} element The HTML element.
param: {string}      className The class name.

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

param: {NodeList} topMenuItems All menu items.

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

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

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

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



Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref