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
JavaScript
<div id="targetElement"></div>
<div id="tooltip">
    <p>Tooltip content</p>
</div>
$(function () {
    $("#tooltip").dxTooltip({
        target: '#targetElement',
        showEvent: 'dxhoverstart',
        hideEvent: 'dxhoverend'
    });
});
Angular
HTML
<div id="targetElement"></div>
<dx-tooltip
    target="#targetElement"
    showEvent="dxhoverstart"
    hideEvent="dxhoverend">
        <p>Tooltip content</p>
</dx-tooltip>
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 Controls
Razor C#
Razor VB
@(Html.DevExtreme().Tooltip()
    .ID("tooltip")
    .Target("#targetElement")
    .ShowEvent("dxhoverstart")
    .HideEvent("dxhoverend")
    .ContentTemplate(@<text>
        <p>Tooltip content</p>
    </text>)
)
<div id="targetElement"></div>
@Code
    Html.DevExtreme().Tooltip() _
        .ID("tooltip") _
        .Target("#targetElement") _
        .ShowEvent("dxhoverstart") _
        .HideEvent("dxhoverend") _
        .ContentTemplate(Sub()
            @<text>
                <p>Tooltip content</p>
            </text>
        End Sub).Render
End Code
<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.

See Also