diff options
Diffstat (limited to 'ui/jquery.ui.tooltip.js')
-rw-r--r-- | ui/jquery.ui.tooltip.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index d30e49c66..f19061bc3 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -22,13 +22,19 @@ $.widget( "ui.tooltip", { content: function() { return $( this ).attr( "title" ); }, + hide: true, items: "[title]", position: { my: "left+15 center", at: "right center", collision: "flip fit" }, - tooltipClass: null + show: true, + tooltipClass: null, + + // callbacks + close: null, + open: null }, _create: function() { @@ -132,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", @@ -175,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 ) { |