JavaScript/jQuery Tooltip - Overview

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

View Demo

The following code creates a simple Tooltip on your page and attaches it to another element (in this example, to an image).

HTML
JavaScript
  • <img id="image" src="https://url/to/an/image" />
  • <div id="tooltipContainer"></div>
  • $(function() {
  • $("#tooltipContainer").dxTooltip({
  • target: "#image",
  • showEvent: 'dxhoverstart',
  • hideEvent: 'dxhoverend',
  • contentTemplate: function (contentElement) {
  • contentElement.append(
  • $("<p />").text("Tooltip content")
  • )
  • }
  • });
  • });
See Also