Popover

Popover

new Popover(element, options)

Source:
Parameters:
Name Type Description
element HTMLElement

DOM element for component instantiation and scope

options Object
Properties
Name Type Description
toggleSelector String

Selector for toggling element

attachClickListener Boolean

Whether or not to bind click events on toggle

attachKeyListener Boolean

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:
Name Type Description
e Event

handleClickOnToggle(e)

Description:
  • Toggles between collapsed/expanded states.

Source:
Parameters:
Name Type Description
e Event

handleKeyboardGlobal(e)

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

Source:
Parameters:
Name Type Description
e Event

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:
Name Type Description
root HTMLElement

DOM element for component instantiation and scope

Returns:

An instance of Popover.

Type
Popover