6 Ext.onReady(function() {
7 // Generate the buttons
8 var defaultButtonConfig = {
17 text : 'Basic ToolTip',
21 text : 'autoHide disabled',
25 text : 'Ajax ToolTip',
33 text : 'Anchor right, rich content',
37 text : 'Anchor below',
42 text : 'Anchor with tracking',
46 Ext.each(buttons, function(config) {
47 var btn = Ext.create('Ext.Button', Ext.apply({}, config, defaultButtonConfig));
53 html: 'A very simple tooltip'
57 autoLoad: {url: 'ajax-tip.html'},
58 dismissDelay: 15000 // auto hide after 15 seconds
61 title: 'My Tip Title',
62 html: 'Click the X to close me',
70 html: 'This tip will follow the mouse while it is over the element',
73 title: '<a href="#">Rich Content Tooltip</a>',
74 id: 'content-anchor-tip',
75 target: 'leftCallout',
81 contentEl: 'content-tip', // load content from the page
84 this.header.on('click', function(e){
86 Ext.Msg.alert('Link', 'Link to something interesting.');
87 Ext.getCmp('content-anchor-tip').hide();
88 }, this, {delegate:'a'});
92 target: 'bottomCallout',
94 anchorOffset: 85, // center the anchor on the tooltip
95 html: 'This tip\'s anchor is centered'
97 target: 'trackCallout',
100 html: 'Tracking while you move the mouse'
103 Ext.each(tooltips, function(config) {
104 Ext.create('Ext.tip.ToolTip', config);
107 Ext.QuickTips.init();