This directive allows you to show tooltips on any element by using the tooltip attribute. The directive is very easy to use as the examples below will show. The tooltips can have its position customised and show content straight from the attribute or of any other element in the page.
To set where the tooltip should appear, use the tooltip-pos attribute. The possible values are: top (default), left, right or bottom.
On top (Default) | ||
To the Left | To the Right | |
Below |
The tooltip can be triggered by a mouse move or by a click. The default is mouse move. To explicitly set the trigger mecanism, use the tooltip-trigger attribute and set it to click. The other possible value is move.
Tooltips can be dismissed by a mouse leave or by a click. The default is mouse leave. To explicitly set the dismissal mecanism, use the tooltip-dismiss attribute and set it to click. The other possible value is mouse.
Tooltip content comes from the tooltip attribute by default. But you can set it to any element using CSS's ID notation. Example: #myelementid. The element will have its contents shown as the tooltip. Note that the element's tag itself is not rendered, only its content. HTML tags can be included in the value of the tooltip attribute.