fxTip

Description:
  • The fxTip module provides the create and remove functions which are exposed by the default object, which is exported in index.js. It also provides a listener to detect the removal of DOM elements that have a tooltip associated with them and exports a method to suspend polling of the DOM for removed elements.

Source:

The fxTip module provides the create and remove functions which are exposed by the default object, which is exported in index.js. It also provides a listener to detect the removal of DOM elements that have a tooltip associated with them and exports a method to suspend polling of the DOM for removed elements.

Members

(inner) DOMchecking :boolean

Description:
  • The state of whether DOM polling is enabled

Source:
Since:
  • v2.1.1

The state of whether DOM polling is enabled

Type:
  • boolean

(inner, constant) targetTimerInterval :number

Description:
  • The timing metric used to determine how frequently the DOM should be queried for removed elements. Triggers the detectTargetRemoval event listener.

Source:

The timing metric used to determine how frequently the DOM should be queried for removed elements. Triggers the detectTargetRemoval event listener.

Type:
  • number

Methods

(inner) create(elementId, content) → {Tip|undefined}

Description:
  • Creates a new Tip class object with all of the default parameters. If a tooltip is already associated with DOM element represented by the elementId parameter, that tooltip is deleted and replaced by a new one.

Source:
Parameters:
Name Type Description
elementId string

The unique id of the DOM element that be associated with the tooltip.

content string

Any valid HTML content that will be displayed in the tooltip when shown.

Returns:

A newly instantiated Tip class object. If the element represented by the elementId parameter is not in the DOM, returns undefined.

Type
Tip | undefined

(inner) remove(elementId)

Description:
  • Removes a specific tooltip from the stack (both the tips and tipsIndex arrays) by calling the Tip class object's remove method. If the DOM element represented by the elementId parameter is not in the DOM, no action is taken.

Source:
Parameters:
Name Type Description
elementId string

The unique id of the DOM element associated with the tooltip to be removed.

(inner) checkDOM(checkDOM)

Description:
  • Controls whether the DOM will be periodically polled to see if DOM elements that are associated with a tooltip have been remove from the document, and automatically removes the Tip class object. This may be useful if your document has a large number of tooltips and you don't desire the additional overhead of polling the DOM.

Source:
Since:
  • v2.1.1
Parameters:
Name Type Description
checkDOM boolean

Whether to poll the DOM or not.

Events

detectTargetRemoval

Description:
  • Iterates through the tooltip stack to determine if any DOM elements associated with tooltips have been removed. These tooltips are then removed from the stack.

Source: