Skip to content
This repository
Newer
Older
100644 154 lines (148 sloc) 6.304 kb
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
1 <?xml version="1.0"?>
2 <?xml-stylesheet type="text/xsl" href="../entries2html.xsl" ?>
3 <entry name="tooltip" namespace="fn" type="Widget" widgetnamespace="ui">
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
4 <desc>Customizable, themeable tooltips, replacing native tooltips.</desc>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
5 <longdesc>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
6 <p>Tooltip replaces native tooltips, making them themable as well as allowing various customizations:</p>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
7
8 <ul>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
9 <li>Display other content than just the title, like inline footnotes or extra content retrieved via Ajax.</li>
10 <li>Customize the positioning, e.g., to center the tooltip above elements.</li>
11 <li>Add extra styling to customize the appearance, for warning or error fields.</li>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
12 </ul>
13
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
14 <p>A fade animation is used by default to show and hide the tooltip, making the appearance a bit more organic, compared to just toggling the visiblity. This can be customized with the <a href="#option-show"><code>show</code></a> and <a href="#option-hide"><code>hide</code></a> options.</p>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
15
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
16 <p>The <a href="#option-items"><code>items</code></a> and <a href="#option-content"><code>content</code></a> options need to stay in-sync. If you change one of them, you need to change the other.</p>
0add1d79 » jzaefferer
2012-06-06 Add note about functional CSS to all widgets and two interactions. Al…
17
18 <p>This widget requires some functional CSS, otherwise it won't work. If you build a custom theme, use the widget's specific CSS file as a starting point.</p>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
19 </longdesc>
20 <created>1.9</created>
21 <options>
22 <option name="content" default="function returning the title attribute">
23 <desc>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
24 The content of the tooltip. The callback can either return the content directly, or call the first argument, passing in the content, e.g., for Ajax content.
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
25
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
26 When changing this option, you likely need to also change the <a href="#option-items"><code>items</code></a> option.</desc>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
27 <type name="Function" />
d29d2125 » jzaefferer
2012-08-05 Fix examples/demos. Will fix #24, pending a change to web-base-template
28 <!-- FIXME
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
29 <example>
30 function(response) {
31 $.getJSON("tooltipcontent.html", response);
32 }
33 </example>
d29d2125 » jzaefferer
2012-08-05 Fix examples/demos. Will fix #24, pending a change to web-base-template
34 -->
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
35 </option>
23c7391b » kborchers
2012-08-05 Move disabled option to inherits. Fixes #29
36 <widget-inherit id="widget-disabled" />
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
37 <option name="hide" default="true">
38 <desc>How to hide the tooltip.</desc>
39 <type name="Boolean" />
40 <type name="Object" />
41 </option>
42 <option name="items" default="[title]">
43 <desc>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
44 A selector indicating which items should show tooltips. Customize if you're using something other then the title attribute for the tooltip content, or if you need a different selector for event delegation.
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
45
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
46 When changing this option, you likely need to also change the <a href="#option-content"><code>content</code></a> option.
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
47 </desc>
48 <type name="Selector" />
49 </option>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
50 <option name="position" default='{ my: "left+15 center", at: "right center", collision: "flipfit" }'>
51 <desc>Configuration for the Position utility. The <code>of</code> property defaults to the target element, but can also be overriden.</desc>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
52 <type name="Object" />
53 </option>
54 <option name="show" default="true">
55 <desc>How to show the tooltip.</desc>
56 <type name="Boolean" />
57 <type name="Object" />
58 </option>
59 <option name="tooltipClass" default="null">
60 <desc>
61 A class to add to the widget, can be used to display various tooltip types, like warnings or errors.
bc7d2051 » jzaefferer
2012-06-19 Tooltip: Document track option. Fixes #9
62 <p>This may get replaced by the <a href="http://bugs.jqueryui.com/ticket/7053">classes option</a>.</p>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
63 </desc>
64 <type name="String" />
65 </option>
bc7d2051 » jzaefferer
2012-06-19 Tooltip: Document track option. Fixes #9
66 <option name="track" type="Boolean" default="false">
67 <desc>
68 Whether the tooltip should track (follow) the mouse.
69 </desc>
70 </option>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
71 </options>
72 <methods>
73 <method name="close">
74 <desc>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
75 Closes a tooltip. If the widget's element is the target, the event argument is optional. Otherwise you have to pass an event object with the <code>currentTarget</code> property pointing at the target.
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
76 </desc>
77 <argument name="event" type="Event" optional="true">
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
78 <desc>What triggered the tooltip to close.</desc>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
79 </argument>
80 </method>
aa3f0bf4 » kborchers
2012-06-29 Move inherited widget methods to include files
81 <widget-inherit id="widget-destroy" />
82 <widget-inherit id="widget-disable" />
83 <widget-inherit id="widget-enable" />
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
84 <method name="open">
85 <desc>
86 Programmatically open a tooltip. If the widget's element is the target, the event argument is optional. Otherwise you have to pass an event object with the <code>currentTarget</code> property pointing at the target.
87 </desc>
88 <argument name="event" type="Event" optional="true">
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
89 <desc>What triggered the tooltip to open.</desc>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
90 </argument>
91 </method>
3a1eb84c » kborchers
2012-06-30 Update the widget option method signature files' names to be more des…
92 <widget-inherit id="widget-get-options" />
93 <widget-inherit id="widget-get-option" />
94 <widget-inherit id="widget-set-option" />
95 <widget-inherit id="widget-set-options" />
aa3f0bf4 » kborchers
2012-06-29 Move inherited widget methods to include files
96 <widget-inherit id="widget-widget" />
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
97 </methods>
98 <events>
8d78a96e » kborchers
2012-08-06 Move create event to inherits. Fixes #30
99 <widget-inherit id="widget-create" />
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
100 <event name="open" type="tooltipopen">
101 <desc>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
102 Triggered when a tooltip is shown, triggered on <code>focusin</code> or <code>mouseover</code>.
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
103 </desc>
104 <argument name="event" type="Event" null="true">
105 </argument>
106 <argument name="ui" type="Object">
107 <property name="tooltip" type="jQuery">
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
108 <desc>The generated tooltip element.</desc>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
109 </property>
110 </argument>
111 </event>
112 <event name="close" type="tooltipclose">
113 <desc>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
114 Triggered when a tooltip is closed, triggered on <code>focusout</code> or <code>mouseleave</code>.
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
115 </desc>
116 <argument name="event" type="Event" null="true">
117 </argument>
118 <argument name="ui" type="Object">
119 <property name="tooltip" type="jQuery">
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
120 <desc>The generated tooltip element.</desc>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
121 </property>
122 </argument>
123 </event>
124 </events>
125 <example>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
126 <desc>Create a tooltip on the document, using event delegation for all elements with a title attribute.</desc>
127 <code><![CDATA[
128 $( document ).tooltip();
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
129 ]]></code>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
130 <html><![CDATA[
131 <p>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
132 <a href="#" title="Anchor description">Anchor text</a>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
133 <input title="Input help">
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
134 </p>]]></html>
135 </example>
136 <example>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
137 <desc>Create a tooltip on the paragraph element, matching all images with an alt attribute. Use the alt attribute as the tooltip's content for each image.</desc>
138 <code><![CDATA[
139 $( "p" ).tooltip({
140 items: "img[alt]",
141 content: function() {
142 return $( this ).attr( "alt" );
143 }
144 });
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
145 ]]></code>
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
146 <html><![CDATA[
147 <p>
d29d2125 » jzaefferer
2012-08-05 Fix examples/demos. Will fix #24, pending a change to web-base-template
148 <img src="/resources/images/st-stephens.jpg" alt="St. Stephen's Cathedral">
149 <img src="/resources/images/tower-bridge.jpg" alt="Tower Bridge">
2edf783a » scottgonzalez
2012-08-06 Tooltip: Cleanup.
150 </p>
151 ]]></html>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
152 </example>
dbad9083 » jzaefferer
2012-05-30 Add missing categories and fix the uncategorized category, needs uppe…
153 <category slug="widgets"/>
2cfe0edb » jzaefferer
2012-05-28 Tooltip: Import from jquery-docs, include widget-inherited methods
154 </entry>
Something went wrong with that request. Please try again.