Popover

Popover

new Popover(element, options)

Source:
Parameters:
NameTypeDescription
elementHTMLElement

DOM element for component instantiation and scope

optionsObject
Properties
NameTypeDescription
toggleSelectorString

Selector for toggling element

attachClickListenerBoolean

Whether or not to bind click events on toggle

attachKeyListenerBoolean

Whether or not to bind keyboard events

Classes

Popover

Methods

checkPosition()

Description:
  • Trigger events on resize Uses a debounce, for performance

Source:

closePopover()

Description:
  • Close the popover.

Source:

destroy()

Description:
  • Destroy component.

Source:

handleClickGlobal(e)

Description:
  • Handles global click events, triggered outside of the popover.

Source:
Parameters:
NameTypeDescription
eEvent

handleClickOnToggle(e)

Description:
  • Toggles between collapsed/expanded states.

Source:
Parameters:
NameTypeDescription
eEvent

handleKeyboardGlobal(e)

Description:
  • Handles global keyboard events, triggered outside of the popover.

Source:
Parameters:
NameTypeDescription
eEvent

init()

Description:
  • Initialise component.

Source:

openPopover()

Description:
  • Open the popover.

Source:

positionPopover()

Description:
  • Manage popover position.

Source:

resetStyles()

Description:
  • Resets the popover selectors and styles.

Source:

(static) autoInit(root) → {Popover}

Source:
Parameters:
NameTypeDescription
rootHTMLElement

DOM element for component instantiation and scope

Returns:

An instance of Popover.

Type
Popover