tips

The tips module provides functions to retrieve a tip object from its owning DOM element's unique id and to auto-size a tooltip.

Source:

Methods

(inner) getTipByElementId(elementId) → {Tip}

Source:

Retrieves the Tip class object associated with the DOM element that has the unique id provided by the argument, elementId. If there is no Tip class object associated with the id, returns undefined. This is useful for when you create several tooltips which will need to accessed at run time and you do not wish to store a variable to hold each.

Parameters:
Name Type Description
elementId string

The unique id of the target DOM element whose tooltip you want to retrieve.

Returns:

if the tip exists, returns the Tip class object associated with the DOM element id provided. Otherwise, undefined.

Type
Tip

(inner) sizeTip()

Source:

Automatically sizes the tooltip to roughly correspond to the viewport's aspect ratio. This function is only called if the autoSize option is true.