Tooltips Examples for showing pagination to indicate a series of related content exists across multiple pages.

Tooltip basics

Hover over the links below to see tooltips:

Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.

Tooltip Placement

How to position the tooltip - auto | top | bottom | left | right. When auto is specified, it will dynamically reorient the tooltip.

When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the tooltip instance.

Tooltip animation

Disable the CSS fade transition to the tooltip by using data-animation="false"

Tooltip Container

Appends the tooltip to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.
Toolip is nested in this container but displayed on the hovered element above. Once this container is hidden the tooltip will not be visible. Try hiding the container by pressing the "hide" button above

Delayed Tooltip

Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type. If a number is supplied, delay is applied to both hide/show. Object structure is: delay: { "show": 500, "hide": 100 }

Adding dynamic objects

If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (jQuery.on support).

Toggle the checkbox below and click the 'add new tooltip' button to observe the behavioral differences between using the selector option, and not using it.


$('body').tooltip({
  selector: '.has-tooltip'
});
$('.has-tooltip').tooltip();

Tooltip Templating

Base HTML to use when creating the tooltip. The tooltip's title will be injected into the .tooltip-inner. The outermost wrapper element should have the .tooltip class and role="tooltip"
Backgrounds
Sizing

Tooltip Triggers

How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.

'manual' indicates that the tooltip will be triggered programmatically via the .tooltip('show'), .tooltip('hide') and .tooltip('toggle') methods; this value cannot be combined with any other trigger.

'hover' on its own will result in tooltips that cannot be triggered via the keyboard, and should only be used if alternative methods for conveying the same information for keyboard users is present.

Tooltips Offset

Offset of the tooltip relative to its target. When a function is used to determine the offset, it is called with an object containing the offset data as its first argument. The function must return an object with the same structure. The triggering element DOM node is passed as the second argument.