Shared tooltip positioning and lifecycle utilities.
Provides a single-active-tooltip model: only one tooltip can be
visible at a time. Showing a new tooltip automatically hides the
previous one. Tooltips are appended to document.body and
positioned absolutely relative to an anchor element.
Two creation modes are available:
showTooltipEl -- positions and shows a pre-built tooltip element
showTooltip -- builds a Wikidot-compatible .hovertip > .content
wrapper from a source element's children (cloned to prevent XSS)
hideTooltip removes the currently active tooltip from the DOM.
Shared tooltip positioning and lifecycle utilities.
Provides a single-active-tooltip model: only one tooltip can be visible at a time. Showing a new tooltip automatically hides the previous one. Tooltips are appended to
document.bodyand positioned absolutely relative to an anchor element.Two creation modes are available:
.hovertip > .contentwrapper from a source element's children (cloned to prevent XSS)hideTooltip removes the currently active tooltip from the DOM.