Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / examples / simple-widgets / qtips.js
index d9bfd5c..08f7ac3 100644 (file)
@@ -1,11 +1,9 @@
-/*\r
- * Ext JS Library 2.2.1\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * licensing@extjs.com\r
- * \r
- * http://extjs.com/license\r
- */\r
-\r
+/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
 Ext.onReady(function(){\r
     new Ext.ToolTip({\r
         target: 'tip1',\r
@@ -35,6 +33,41 @@ Ext.onReady(function(){
         html: 'This tip will follow the mouse while it is over the element',\r
         trackMouse:true\r
     });\r
+    \r
+    new Ext.ToolTip({        \r
+        title: '<a href="#">Rich Content Tooltip</a>',\r
+        id: 'content-anchor-tip',\r
+        target: 'leftCallout',\r
+        anchor: 'left',\r
+        html: null,\r
+        width: 415,\r
+        autoHide: false,\r
+        closable: true,\r
+        contentEl: 'content-tip', // load content from the page\r
+        listeners: {\r
+            'render': function(){\r
+                this.header.on('click', function(e){\r
+                    e.stopEvent();\r
+                    Ext.Msg.alert('Link', 'Link to something interesting.');\r
+                    Ext.getCmp('content-anchor-tip').hide();\r
+                }, this, {delegate:'a'});\r
+            }\r
+        }\r
+    });\r
+    \r
+    new Ext.ToolTip({\r
+        target: 'bottomCallout',\r
+        anchor: 'top',\r
+        anchorOffset: 85, // center the anchor on the tooltip\r
+        html: 'This tip\'s anchor is centered'\r
+    });\r
+    \r
+    new Ext.ToolTip({\r
+        target: 'trackCallout',\r
+        anchor: 'right',\r
+        trackMouse: true,\r
+        html: 'Tracking while you move the mouse'\r
+    });\r
 \r
 \r
     Ext.QuickTips.init();\r