Basic
You can add tooltips to any element you like. Just add a tooltip
class to it, and by default the title
attribute will be used as the message.
Custom message attribute
If you need to use the element's title
for another purpose, or if you don't want the default browser's behavior of the title appearing together with the tooltip, you can use the data-tooltip
instead of the title
attribute.
Placement
You can change the default placement of the tooltip (top) with the classes tooltip-left
, tooltip-right
and tooltip-bottom
.
Alignment
By default, the tooltip is aligned at the center of the trigger. You can change this by using the classes tooltip-start
and tooltip-end
, so the tooltip will be aligned at the start (top or left) or end (bottom or right) limit of the trigger.
Try it: