From 67d49f593bb34f10751421a51c8e13d42bc1b16e Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Wed, 13 Apr 2011 14:01:46 +0200 Subject: Overhaul tooltip implementation. Avoid queuing and other problems by creating the tooltip element on the fly, never reusing it. Use aria-describedby attribute to find the associated tooltip again. Allows customizing animations much easier (just replace fadeIn/fadeOut), still open. Updated demos and visual test to replace now-missing .widget() method. Added tooltipClass for that. --- demos/tooltip/tracking.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'demos/tooltip/tracking.html') diff --git a/demos/tooltip/tracking.html b/demos/tooltip/tracking.html index e3bb19e74..dd5dc9d92 100644 --- a/demos/tooltip/tracking.html +++ b/demos/tooltip/tracking.html @@ -13,12 +13,11 @@ $(function() { $(".demo").tooltip({ open: function() { - var tooltip = $(this).tooltip("widget"); - $(document).mousemove(function(event) { - tooltip.position({ - my: "left center", - at: "right center", - offset: "25 25", + var tooltip = $( ".ui-tooltip" ); + $(document).mousemove(function( event ) { + tooltip.position( { + my: "left+25 center", + at: "right+25 center", of: event }); }) @@ -26,7 +25,7 @@ .mousemove(); }, close: function() { - $(document).unbind("mousemove"); + $(document).unbind( "mousemove" ); } }); }); -- cgit v1.2.3