Search
TooltipTrigger Enumeration
See Also
 






Specifies the event, which shows the tooltip.

Namespace: MindFusion.Common.UI
File: DropDown.js

 Syntax

JavaScript  Copy Code

// enum
TooltipTrigger = {}

 Members

  Member name Value Description

Click

2

Indicates that the tooltip will be shown when the target element is clicked.

Focus

1

Indicates that the tooltip will be shown when the target element is focused.

Hover

0

Indicates that the tooltip will be shown when the target element is hovered.

None

-1

Indicates that the tooltip display will be triggered manually.

 Example

The following code creates a new instance of the Tooltip class associated with the HTMLElement of a Window and handles its tooltipShow event:

JavaScript  Copy Code

var tooltip = new ui.Tooltip(window.element);
tooltip.trigger = ui.TooltipTrigger.Focus;
tooltip.position = ui.TooltipPosition.Cursor;
tooltip.text = "Map of the European Union";

tooltip.tooltipShow.addEventListener(tooltipShowEventHandler);


function tooltipShowEventHandler(sender, args)
{
  if(sender == tooltip1)
   //event handling code comes here 
}

 See Also