Tooltip
A sub namespace of UI, exclusive for tooltip operations
//accessing to ui.tooltip methods
SW.UI.Tooltip.{methodName}
set
Description
This method can be used to set a new tooltip to a html element.
Method(s)
1   function set(reference: HTMLElement, data: object | string,
2       params: {
3           documentName?: DocumentName,
4           tooltipOptions?: PopperContentOptions
5       } = {}
6   ): void
| Parameter | Type | Required | Defaults | Description | 
|---|---|---|---|---|
| reference | HTMLElement | true | Element's reference | |
| data | object | string | true | Data to be displayed | |
| documentName | DocumentName | false | Document name | |
| tooltipOptions | PopperContentOptions | false | Tooltip options | 
Basic Usage
SW.UI.Tooltip.set(element, jobData, { documentName: SW.DocumentName.Job });
show
Description
This method can be used to show a tooptip in a html element. (When used, to hide the tooltip use SW.UI.Tooltip.hide())
Method(s)
1   function show(reference: HTMLElement, data: object | string,
2       params: {
3           documentName?: DocumentName,
4           tooltipOptions?: PopperContentOptions
5       } = {}
6   ): void
| Parameter | Type | Required | Defaults | Description | 
|---|---|---|---|---|
| reference | HTMLElement | true | Element's reference | |
| data | object | string | true | Data to be displayed | |
| documentName | DocumentName | false | Document name | |
| tooltipOptions | PopperContentOptions | false | Tooltip options | 
Basic Usage
SW.UI.Tooltip.(element, jobData, { documentName: SW.DocumentName.Job });
hide
Description
This method can be used to hide a tooltip. (Only used when using SW.UI.Tooltip.show())
Method(s)
1 function hide(reference: HTMLElement): void
| Parameter | Type | Required | Defaults | Description | 
|---|---|---|---|---|
| reference | HTMLElement | true | Element's reference | 
Basic Usage
SW.UI.tooltip.hide(element);