mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
65 lines
1.9 KiB
HTML
65 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>jQuery UI Tooltip - Custom animation demo</title>
|
|
<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>
|
|
<script src="../../ui/jquery.effects.core.js"></script>
|
|
<script src="../../ui/jquery.effects.explode.js"></script>
|
|
<link rel="stylesheet" href="../demos.css">
|
|
<script>
|
|
$(function() {
|
|
$( "#show-option" ).tooltip({
|
|
show: {
|
|
effect: "slideDown",
|
|
delay: 250
|
|
}
|
|
});
|
|
$( "#hide-option" ).tooltip({
|
|
hide: {
|
|
effect: "explode",
|
|
delay: 250
|
|
}
|
|
});
|
|
$( "#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" );
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="demo">
|
|
|
|
<p>There are various ways to customize the animation of a tooltip.</p>
|
|
<p>You can use the <a id="show-option" href="http://jqueryui.com/demos/tooltip/#option-show" title="show effect">show</a> and
|
|
<a id="hide-option" href="http://jqueryui.com/demos/tooltip/#option-hide" title="hide effect">hide</a> options.</p>
|
|
<p>You can also use the <a id="position-option" href="http://jqueryui.com/demos/tooltip/#option-position" title="position option">position option</a>.</p>
|
|
|
|
</div><!-- End demo -->
|
|
|
|
|
|
|
|
<div class="demo-description">
|
|
<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>
|
|
</div><!-- End demo-description -->
|
|
|
|
</body>
|
|
</html>
|