Always show dojo tooltip

I have the following code for adding tooltip for onclick of a span id as shown below:

new dijit.Tooltip({
            connectId: ['gridEditHelp'],
            label: 'Double click on an item in the below table to perform inline editing of attributes',
            position: ['above']
});

The problem is that I want the tooltip to be visible always on the web page.

Any ideas or existing API available for the same?

Upvotes: 2

Views: 1452

Answers (1)

mschr
mschr

Reputation: 8641

Use TooltipDialog instead - or else you will have to mess with the _MasterTooltip manager (there's more or less only one global, reusable tooltip). Then call dijit.popup.open - and never call .close

dijit.popup.open({
     popup: new TooltipDialog({
            id: 'myTooltipDialog',
            style: "width: 300px;",
            content: "<p>I have a mouse leave event handler that will close the dialog."
        });,
     around: dojo.byId('thenode')
});

Upvotes: 3

Related Questions