aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tooltip.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-05-28 10:18:39 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-28 10:18:39 -0400
commitd4f6f17c8de859bcc4b76e15e523fb8b74703afe (patch)
tree40d0da76e622bb887740945f269d94e3f814bb2b /ui/jquery.ui.tooltip.js
parentc34a814a4b140a0b6a7610874d7918eb3a1e01a3 (diff)
downloadjquery-ui-d4f6f17c8de859bcc4b76e15e523fb8b74703afe.tar.gz
jquery-ui-d4f6f17c8de859bcc4b76e15e523fb8b74703afe.zip
Tooltip: Changed custom animation demo and changed the logic for showing tooltips so custom position options can perform animations.
Diffstat (limited to 'ui/jquery.ui.tooltip.js')
-rw-r--r--ui/jquery.ui.tooltip.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index b781174c9..c0aaa4fbe 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -90,11 +90,16 @@ $.widget("ui.tooltip", {
target.attr( "aria-describedby", tooltip.attr( "id" ) );
}
tooltip.find( ".ui-tooltip-content" ).html( content );
- tooltip.position( $.extend({
- of: target
- }, this.options.position ) ).hide();
+ tooltip
+ .stop( true )
+ .position( $.extend({
+ of: target,
+ using: function( pos ) {
+ // we only want to hide if there's no custom using defined
+ $( this ).css( pos ).hide();
+ }
+ }, this.options.position ) );
- tooltip.stop( true );
this._show( tooltip, this.options.show );
this._trigger( "open", event );