2010-10-26 12:47:31 +00:00
<!doctype html>
< html lang = "en" >
< head >
2011-05-28 00:52:13 +00:00
< meta charset = "utf-8" >
2010-10-26 12:47:31 +00:00
< title > jQuery UI Tooltip - Custom animation demo< / title >
2011-05-28 00:52:13 +00:00
< link rel = "stylesheet" href = "../../themes/base/jquery.ui.all.css" >
< script src = "../../jquery-1.5.1.js" > < / script >
< script src = "../../ui/jquery.ui.core.js" > < / script >
< script src = "../../ui/jquery.ui.widget.js" > < / script >
< script src = "../../ui/jquery.ui.position.js" > < / script >
< script src = "../../ui/jquery.ui.tooltip.js" > < / script >
2011-05-28 14:18:39 +00:00
< script src = "../../ui/jquery.effects.core.js" > < / script >
< script src = "../../ui/jquery.effects.explode.js" > < / script >
2011-05-28 00:52:13 +00:00
< link rel = "stylesheet" href = "../demos.css" >
< script >
2010-10-26 12:47:31 +00:00
$(function() {
2011-05-28 14:18:39 +00:00
$( "#show-option" ).tooltip({
2011-04-15 14:49:29 +00:00
show: {
2011-04-21 12:30:42 +00:00
effect: "slideDown",
delay: 250
2011-05-28 14:18:39 +00:00
}
});
$( "#hide-option" ).tooltip({
2011-04-15 14:49:29 +00:00
hide: {
2011-05-28 14:18:39 +00:00
effect: "explode",
2011-05-02 11:11:58 +00:00
delay: 250
2010-10-26 12:47:31 +00:00
}
});
2011-05-28 14:18:39 +00:00
$( "#position-option" ).tooltip({
position: {
my: "left top",
at: "left bottom+10",
using: function( pos ) {
$( this ).css({
left: pos.left,
top: pos.top - 10
}).animate({ top: pos.top }, "fast" );
}
}
});
2010-10-26 12:47:31 +00:00
});
< / script >
< / head >
< body >
< div class = "demo" >
2011-05-28 14:18:39 +00:00
< p > There are various ways to customize the animation of a tooltip.< / p >
2011-05-28 21:14:42 +00:00
< p > You can use the < a id = "show-option" href = "http://jqueryui.com/demos/tooltip/#option-show" title = "slide down on show" > show< / a > and
< a id = "hide-option" href = "http://jqueryui.com/demos/tooltip/#option-hide" title = "explode on hide" > hide< / a > options.< / p >
< p > You can also use the < a id = "position-option" href = "http://jqueryui.com/demos/tooltip/#option-position" title = "move down on show" > position option< / a > .< / p >
2010-10-26 12:47:31 +00:00
< / div > <!-- End demo -->
< div class = "demo-description" >
2011-05-02 11:11:58 +00:00
< p > This demo shows how to customize animations. The tooltip is shown, after a
delay of 250ms, using a slide down animation, and hidden, after another delay,
without an animation.< / p >
2010-10-26 12:47:31 +00:00
< / div > <!-- End demo - description -->
< / body >
< / html >