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/custom-animation.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/custom-animation.html')
-rw-r--r-- | demos/tooltip/custom-animation.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/demos/tooltip/custom-animation.html b/demos/tooltip/custom-animation.html index a9d0df66e..a9745a062 100644 --- a/demos/tooltip/custom-animation.html +++ b/demos/tooltip/custom-animation.html @@ -11,12 +11,15 @@ <link type="text/css" href="../demos.css" rel="stylesheet" /> <script type="text/javascript"> $(function() { + // TODO overhaul this with custom animation API $(".demo").tooltip({ open: function() { - $(this).tooltip("widget").stop(false, true).hide().slideDown(); + $(".ui-tooltip").stop(false, true).hide().slideDown(); }, close: function() { - $(this).tooltip("widget").stop(false, true).show().slideUp(); + $(".ui-tooltip").stop(false, false).show().slideUp(function() { + $(this).remove(); + }); } }); }); |