Skip to content
Browse files

Tooltip: Added demo for custom animations

  • Loading branch information
jzaefferer committed Oct 26, 2010
1 parent 615022a commit 4d6770fe13b6fa73d36b3f72d04585dc744e7961
Showing with 56 additions and 0 deletions.
  1. +55 −0 demos/tooltip/custom-animation.html
  2. +1 −0 demos/tooltip/index.html
@@ -0,0 +1,55 @@
<!doctype html>
<html lang="en">
<title>jQuery UI Tooltip - Custom animation demo</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.tooltip.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("a, input").tooltip({
open: function() {
$(this).tooltip("widget").stop(false, true).hide().slideDown();
close: function() {
$(this).tooltip("widget").stop(false, true).show().slideUp();
label { display: inline-block; width: 5em; }

<div class="demo">

<p><a href="#" title="That's what this widget is">Tooltips</a> can be attached to any element. When you hover
the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip.
<p>But as it's not a native tooltip, it can be styled. Any themes built with
<a href="" title="ThemeRoller, jQuery UI's theme builder application">ThemeRoller</a>
will also style tooltip's accordingly.</p>
<p>Tooltip's are also useful for form elements, to show some additional information in the context of each field.</p>
<p><label for="age">Your age:</label><input id="age" title="We ask for your age only for statistical purposes." /></p>
<p>Click the field to see the tooltip; when you tab out of the field, it gets hidden.</p>

</div><!-- End demo -->

<div class="demo-description">

<p>Here the tooltips are positioned relative to the mouse, and follow the mouse while it moves above the element.</p>

</div><!-- End demo-description -->

@@ -12,6 +12,7 @@ <h4>Examples</h4>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
<li><a href="forms.html">Forms with tooltips</a></li>
<li><a href="tracking.html">Track the mouse</a></li>
<li><a href="custom-animation.html">Custom animation</a></li>

0 comments on commit 4d6770f

Please sign in to comment.
You can’t perform that action at this time.