Tooltip

The Tooltip widget displays a tooltip for a specified element on the page.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/tooltip
Export: default

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

  • jQuery

    HTML
    <div id="targetElement"></div>
    <div id="tooltip">
        <p>Tooltip content</p>
    </div>
    JavaScript
    $(function () {
        $("#tooltip").dxTooltip({
            target: '#targetElement',
            showEvent: 'dxhoverstart',
            hideEvent: 'dxhoverend'
        });
    });
  • AngularJS

    HTML
    <div id="targetElement"></div>
    <div dx-tooltip="{
        target: '#targetElement',
        showEvent: 'dxhoverstart',
        hideEvent: 'dxhoverend'
    }">
        <p>Tooltip content</p>
    </div>
  • Knockout

    HTML
    <div id="targetElement"></div>
    <div data-bind="dxTooltip: {
        target: '#targetElement',
        showEvent: 'dxhoverstart',
        hideEvent: 'dxhoverend'
    }">
        <p>Tooltip content</p>
    </div>
  • ASP.NET MVC Wrappers

    @(Html.DevExtreme().Tooltip()
        .ID("tooltip")
        .Target("#targetElement")
        .ShowEvent("dxhoverstart")
        .HideEvent("dxhoverend"),
        .ContentTemplate(@<text>
            <p>Tooltip content</p>
        </text>)
    )
    <div id="targetElement"></div>

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

View Demo Watch Video

See Also
Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Tooltip widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events fired by this widget.