Ext JS - Learning Center

Manual:Widgets:ToolTip

From Learn About the Ext JavaScript Library

Jump to: navigation, search

ToolTip

The ToolTip widget is an easy way to programmatically add a panel that magically appears and disappears when the mouse hovers over an element (aka. a tooltip).

Adding a tooltip to an existing dom element (with id 'my-elem') is as easy as:

var tt = new Ext.ToolTip({
    target: 'my-elem',
    title: 'Tooltip Title'
});

Or you can add some customizations (ToolTip is a subclass of Panel so we can apply all the usual Panel options, as well as some ToolTip-specific ones):

var tt = new Ext.ToolTip({
    target: 'my-elem',
    title: 'Tooltip Title',
    plain: true,
    showDelay: 0,
    hideDelay: 0,
    trackMouse: true
});
  • This page was last modified on 30 June 2008, at 23:04.
  • This page has been accessed 8,760 times.