Tooltip API

These methods allow you to show Tooltip helper near own elements. Parameters are the same as in CodeX Tooltips library.

show The method shows a tooltip with custom content on the passed element.
hide Method hides the Tooltip.
onHover Decorator for showing tooltip near some element by mouseenter and hide by mouseleave.

show()

The method shows a tooltip with custom content on the passed element.

this.api.tooltip.show(element, content, options);

Parametres

element HTMLElement Tooltip will be showed near this element
content String or Node Content that will be appended to the Tooltip
options Object Some displaying options, see below

Available showing options

Options

placement topbottomleftright Where to place the tooltip. Default value is bottom
marginTop Number Offset above the tooltip with top placement
marginBottom Number Offset below the tooltip with bottom placement
marginLeft Number Offset at left from the tooltip with left placement
marginRight Number Offset at right from the tooltip with right placement
delay Number Delay before showing, in ms. Default is 70
hidingDelay Number Delay before hiding, in ms. Default is 0

Return value

This method does not return anything.

hide()

Method hides the Tooltip.

Parametres

There are no parametres.

Return value

This method does not return anything.

onHover()

Decorator for showing tooltip near some element by mouseenter and hide by mouseleave.

this.api.tooltip.onHover(element, content, options);

Parametres

Parameters are the same as in show() method

Return value

This method does not return anything.