File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,14 @@ $.widget( "ui.tooltip", {
149
149
return ;
150
150
}
151
151
152
+ // Content can be updated multiple times. If the tooltip already
153
+ // exists, then just update the content and bail.
154
+ var tooltip = this . _find ( target ) ;
155
+ if ( tooltip . length ) {
156
+ tooltip . find ( ".ui-tooltip-content" ) . html ( content ) ;
157
+ return ;
158
+ }
159
+
152
160
// if we have a title, clear it to prevent the native tooltip
153
161
// we have to check first to avoid defining a title if none exists
154
162
// (we don't want to cause an element to start matching [title])
@@ -164,15 +172,10 @@ $.widget( "ui.tooltip", {
164
172
}
165
173
}
166
174
167
- // ajaxy tooltip can update an existing one
168
- var tooltip = this . _find ( target ) ;
169
- if ( ! tooltip . length ) {
170
- tooltip = this . _tooltip ( target ) ;
171
- addDescribedBy ( target , tooltip . attr ( "id" ) ) ;
172
- }
175
+ tooltip = this . _tooltip ( target ) ;
176
+ addDescribedBy ( target , tooltip . attr ( "id" ) ) ;
173
177
tooltip . find ( ".ui-tooltip-content" ) . html ( content ) ;
174
178
tooltip
175
- . stop ( true )
176
179
. position ( $ . extend ( {
177
180
of : target
178
181
} , this . options . position ) )
You can’t perform that action at this time.
0 commit comments