Tooltip

Auto-initialising tooltips via data attributes. Converts native title attributes, supports positioning, and refreshes dynamically added elements.

Data Attribute Tooltips

On Icons & Badges

Pending

Native Title Conversion

Elements with a title attribute are automatically converted to Manhattan tooltips.

PHP

JS Data Attributes

Method / PropertyParametersDescription
data-m-tooltipstringTooltip text to display.
data-tooltipstringAlternative attribute name (same behaviour).
data-m-tooltip-positionstringPosition: top (default), right, bottom, left.
data-m-tooltip-disabled"1"Disable the tooltip for this element.
titlestringAutomatically converted to a Manhattan tooltip (native title removed).

JS JS Methods

Method / PropertyParametersDescription
m.tooltip.refresh(root)?HTMLElementRe-scan for tooltip elements. Call after adding new DOM nodes. Defaults to document.
m.tooltip.show(element)HTMLElementShow the tooltip for the given element.
m.tooltip.hide()Hide the currently visible tooltip.