From d4f6f17c8de859bcc4b76e15e523fb8b74703afe Mon Sep 17 00:00:00 2001 From: Scott González Date: Sat, 28 May 2011 10:18:39 -0400 Subject: Tooltip: Changed custom animation demo and changed the logic for showing tooltips so custom position options can perform animations. --- ui/jquery.ui.tooltip.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'ui/jquery.ui.tooltip.js') 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 ); -- cgit v1.2.3