Table Of Contents

Application Packaging Standard

Last updated 18-Mar-2019

aps/Tooltip

Compatibility

All user panels - CP and UX1

Overview

It pops up a tooltip (a help message) when you hover over a node. Also it provides static show() and hide() methods that can be used without instantiating an aps/Tooltip.

The functionality of aps/Tooltip completely matches the functionality of the dijit/Tooltip widget.

Find the nested rules for this widget in the recommended Widget Hierarchy.

Example

RUN DEMO

require(["aps/load", "aps/Tooltip", "aps/PageContainer", "aps/ready!"],
function(load, Tooltip, PageContainer) {
    "use strict";
    load(["aps/PageContainer", [
        ["aps/Panel", [
            ["aps/FieldSet", [
                ["aps/TextArea", {
                    id: "summary",
                    label: "Summary",
                    required: true,
                    cols: 40,
                    missingMessage: "Please fill in the field",
                    value: ""
                }],
                ["aps/TextArea", {
                    label: "Description",
                    cols: 60,
                    missingMessage: "Please fill in the field",
                    value: ""
                }]

            ]]

        ]]
    ]]);
    new Tooltip({
        connectId: ["summary"],
        label: "Type a brief introduction to the subject (<100 chars)."
    });
});

Public Methods

METHOD RETURN DESCRIPTION
hide (aroundNode, custClass)    
show (message, aroundNode, position, rtl, textDir, onMouseEnter, onMouseLeave, custClass, duration)    

hide

ARGUMENT TYPE DESCRIPTION
aroundNode
undefined
 
custClass
undefined
 

show

ARGUMENT TYPE DESCRIPTION
message
undefined
 
aroundNode
undefined
 
position
undefined

If reference is a widget or widget ID and that widget has the .addChild method, the latter will be called and this widget instance will be passed into that method, supplying the optional position index. In this case, position (if specified) should be an integer.

If reference is a DOMNode (or ID matching a DOMNode but not a widget), the position argument can be a numeric index or a string, either “first”, “last”, “before”, or “after”, same as used in dojo/dom-construct::place().

rtl
undefined
 
textDir
undefined
 
onMouseEnter
undefined
 
onMouseLeave
undefined
 
custClass
undefined
 
duration
undefined