aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-08-31 15:41:45 -0400
committerScott González <scott.gonzalez@gmail.com>2012-08-31 15:41:45 -0400
commite242868f563fa244c6cbe04a421cb1734a322024 (patch)
treeaa8c95af0c946e34416f4de1b4a795953ce69ad7 /ui
parentdee7c8bd4493826e13b78b2d702947e6f4ad966e (diff)
downloadjquery-ui-e242868f563fa244c6cbe04a421cb1734a322024.tar.gz
jquery-ui-e242868f563fa244c6cbe04a421cb1734a322024.zip
Tooltip: Allow strings for content option.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.tooltip.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index f94d9715c..bd04861e2 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -152,9 +152,14 @@ $.widget( "ui.tooltip", {
_updateContent: function( target, event ) {
var content,
+ contentOption = this.options.content,
that = this;
- content = this.options.content.call( target[0], function( response ) {
+ if ( typeof contentOption === "string" ) {
+ return this._open( event, target, contentOption );
+ }
+
+ content = contentOption.call( target[0], function( response ) {
// ignore async response if tooltip was closed already
if ( !target.data( "tooltip-open" ) ) {
return;