Alloy UI

aui-tooltip  1.0.1

 
Filters

Class Tooltip - extends OverlayContextPanel

A base class for Tooltip, providing:
  • Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)
  • Additional information when hovering over a target element
Quick Example:
var instance = new A.Tooltip({
trigger: '#element',
align: { points: [ 'lc', 'rc' ] },
bodyContent: 'Simple tooltip'
}).render();
Check the list of Configuration Attributes available for Tooltip.

Constructor

Tooltip ( config )
Parameters:
config <Object> Object literal specifying widget configuration properties.

Properties

Tooltip.ATTRS - static Object

Static property used to define the default attribute configuration for the Tooltip.

Tooltip.NAME - static String

Static property provides a string to identify the class.

Properties inherited from WidgetPositionConstrain:

Properties inherited from WidgetStack:

Properties inherited from Attribute:

Properties inherited from OverlayContextPanel:

Properties inherited from Component:

Properties inherited from WidgetPositionAlign:

Properties inherited from Base:

Properties inherited from WidgetStdMod:

Properties inherited from WidgetPosition:

Properties inherited from OverlayContext:

Configuration Attributes

align - Object

Default Value: { node: null, points: [ BL, TR ] }

anim - Object

Default Value: { show: false }

hideDelay - Number

Default Value: 500

hideOn - String

Default Value: mouseout

showOn - String

Default Value: mouseover

title - boolean

Use the content of the title attribute as the Tooltip content.
Default Value: false

Configuration attributes inherited from WidgetPositionConstrain:

Configuration attributes inherited from Widget:

Configuration attributes inherited from WidgetStack:

Configuration attributes inherited from OverlayContextPanel:

Configuration attributes inherited from Component:

Configuration attributes inherited from WidgetPositionAlign:

Configuration attributes inherited from Base:

Configuration attributes inherited from WidgetStdMod:

Configuration attributes inherited from WidgetPosition:

x,
xy,
y

Methods

_afterBodyChange

protected void _afterBodyChange ( e )
Fires after the attribute bodyContent change.
Parameters:
e <EventFacade>

_loadBodyContentFromTitle

protected void _loadBodyContentFromTitle ( currentNode )
Use the title content of the currentNode as the content of the Tooltip.
Parameters:
currentNode <Node> Current node being used by the Tooltip

bindUI

protected void bindUI ( )
Bind the events on the Tooltip UI. Lifecycle.

show

void show ( )
Over-ride the show to invoke the _loadBodyContentFromTitle. See OverlayContext show.

Methods inherited from Plugin.Host:

Events

alignChange

alignChange ( event )
Fires when the value for the configuration attribute 'align' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

animChange

animChange ( event )
Fires when the value for the configuration attribute 'anim' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

hideDelayChange

hideDelayChange ( event )
Fires when the value for the configuration attribute 'hideDelay' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

hideOnChange

hideOnChange ( event )
Fires when the value for the configuration attribute 'hideOn' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

showOnChange

showOnChange ( event )
Fires when the value for the configuration attribute 'showOn' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

titleChange

titleChange ( event )
Fires when the value for the configuration attribute 'title' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Events inherited from WidgetStack:

Events inherited from Base:

Events inherited from WidgetPosition: