diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2011-04-13 14:01:46 +0200 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2011-04-13 14:01:46 +0200 |
commit | 67d49f593bb34f10751421a51c8e13d42bc1b16e (patch) | |
tree | cca067334b672af9a8d1b85dbc008a04e0c8c63f /demos/tooltip/tracking.html | |
parent | bc65675330e758c406098e929ee8b4c1741c87fd (diff) | |
download | jquery-ui-67d49f593bb34f10751421a51c8e13d42bc1b16e.tar.gz jquery-ui-67d49f593bb34f10751421a51c8e13d42bc1b16e.zip |
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.
Diffstat (limited to 'demos/tooltip/tracking.html')
-rw-r--r-- | demos/tooltip/tracking.html | 13 |
1 files changed, 6 insertions, 7 deletions
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" ); } }); }); |