init

Description:
  • The init module provides functions to initialize the fxToolTip environment upon startup, and to remove it upon shutdown.

Source:

The init module provides functions to initialize the fxToolTip environment upon startup, and to remove it upon shutdown.

Methods

(inner) setup()

Description:
  • The setup function is called upon initialization of the fxToolTip environment. First, it sets a listener for the window resize event which invokes the windowResized function. Second, it determines if there is a current stylesheet associated with the document, and if not inserts one. Next, it inserts four class styles (.fxToolTip, .fxContainer, .fxToolTip::after, and .fxTooltipTarget). .fxToolTip contains all of the rules that style the tooltip. .fxToolTip::after contains all of the rules that style the tooltip arrow. .fxContainer contains rules that style the tooltip content. .fxToolTipTarget contains one rule that styles the cursor of the target element on hover. The setup function also appends one div element to the document body element created with the class name '.fxToolTip' and styles all tooltips in the document.

    note: The classes and div elements are created only once and shared by all of the tooltips.

Source:

(inner) closeDown()

Description:
  • The closeDown function is called after the last tooltip is removed from the stack. It removes all event listeners, div elements, and CSS styles and rules.

Source: