3 <title>The source code</title>
\r
4 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
5 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
7 <body onload="prettyPrint();">
\r
8 <pre class="prettyprint lang-js">Ext.onReady(function(){
\r
11 html: 'A very simple tooltip'
\r
17 autoLoad: {url: 'ajax-tip.html'},
\r
18 dismissDelay: 15000 // auto hide after 15 seconds
\r
23 html: 'Click the X to close me',
\r
24 title: 'My Tip Title',
\r
31 target: 'track-tip',
\r
32 title: 'Mouse Track',
\r
34 html: 'This tip will follow the mouse while it is over the element',
\r
39 title: '<a href="#">Rich Content Tooltip</a>',
\r
40 id: 'content-anchor-tip',
\r
41 target: 'leftCallout',
\r
47 contentEl: 'content-tip', // load content from the page
\r
49 'render': function(){
\r
50 this.header.on('click', function(e){
\r
52 Ext.Msg.alert('Link', 'Link to something interesting.');
\r
53 Ext.getCmp('content-anchor-tip').hide();
\r
54 }, this, {delegate:'a'});
\r
60 target: 'bottomCallout',
\r
62 anchorOffset: 85, // center the anchor on the tooltip
\r
63 html: 'This tip\'s anchor is centered'
\r
67 target: 'trackCallout',
\r
70 html: 'Tracking while you move the mouse'
\r
74 Ext.QuickTips.init();
\r