From e530d06c98571c9330fc8cfda62a438d07e8f65b Mon Sep 17 00:00:00 2001
From: Scott González <scott.gonzalez@gmail.com>
Date: Mon, 30 May 2011 18:42:06 -0400
Subject: Tooltip: Pass the tooltip element in the open and close events.

---
 ui/jquery.ui.tooltip.js | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

(limited to 'ui')

diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index a6ccc07bc..f19061bc3 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -138,16 +138,13 @@ $.widget( "ui.tooltip", {
 		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 ) );
+				of: target
+			}, this.options.position ) )
+			.hide();
 
 		this._show( tooltip, this.options.show );
 
-		this._trigger( "open", event );
+		this._trigger( "open", event, { tooltip: tooltip } );
 
 		this._bind( target, {
 			mouseleave: "close",
@@ -181,7 +178,7 @@ $.widget( "ui.tooltip", {
 
 		target.unbind( "mouseleave.tooltip blur.tooltip" );
 
-		this._trigger( "close", event );
+		this._trigger( "close", event, { tooltip: tooltip } );
 	},
 
 	_tooltip: function( element ) {
-- 
cgit v1.2.3