2

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?

4

1 回答 1

3

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')
});
于 2012-08-30T14:01:13.350 回答