Tooltip

A tooltip widget.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js

The dxTooltip widget displays a tooltip for the specified element. The target element is specified using the target configuration option, which takes on a DOM node, jQuery element or CSS selector.

You can create a widget using one of the following approaches.

  • jQuery
    Use the dxTooltip jQuery plug-in.

    HTML
    <div id="targetElement"></div>
    <div id="tooltip">
        <p>This is the target element</p>
    </div>
    JavaScript
    $("#tooltip").dxTooltip({
        target: '#targetElement',
        visible: true
    });
  • Knockout
    Add a div element and apply the dxTooltip binding to this element.

    HTML
    <div id="targetElement"></div>
    <div data-bind="dxTooltip: {
        target: '#targetElement',
        visible: true
    }">
        <p>This is the target element</p>
    </div>
  • Angular
    Add a div element and apply the dx-tooltip directive to this element.

    HTML
    <div id="targetElement"></div>
    <div dx-tooltip="{
        target: '#targetElement',
        visible: true
    }">
        <p>This is the target element</p>
    </div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or Angular approach, the Knockout or Angular library is also required.

See Also

You can find detailed information on the principles of working with the widget in the dxTooltip section of the Overlay Widgets article.

View Demo

Watch Video

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxTooltip widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events exposed by this widget.