案例:jQuery UI案例     状态:可编辑再运行    进入竖版
 运行结果 
AخA
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 工具提示框(Tooltip) - 自定义动画</title>
6
  <link rel="stylesheet" href="/css/jqu1.10.4/jquery-ui.min.css">
7
  <script src="/js/jqu/jquery.min1.10.2.js"></script>
8
  <script src="/js/jqu/jquery-ui.min1.10.4.js"></script>
9
  <link rel="stylesheet" href="jqueryui/style.css">
10
  <script>
11
  $(function() {
12
    $( "#show-option" ).tooltip({
13
      show: {
14
        effect: "slideDown",
15
        delay: 250
16
      }
17
    });
18
    $( "#hide-option" ).tooltip({
19
      hide: {
20
        effect: "explode",
21
        delay: 250
22
      }
23
    });
24
    $( "#open-event" ).tooltip({
25
      show: null,
26
      position: {
27
        my: "left top",
28
        at: "left bottom"
29
      },
30
      open: function( event, ui ) {
31
        ui.tooltip.animate({ top: ui.tooltip.position().top + 10 }, "fast" );
32
      }
33
    });
34
  });
35
  </script>
36
</head>
37
<body>
38
 
39
<p>这里有多种方式自定义工具提示框的动画。</p>
40
<p>您可以使用 <a id="show-option" href="//jqueryui.com/demos/tooltip/#option-show" title="向下滑动显示">show</a>
41
<a id="hide-option" href="//jqueryui.com/demos/tooltip/#option-hide" title="爆炸隐藏">hide</a> 选项。</p>
42
<p>您也可以使用 <a id="open-event" href="//jqueryui.com/demos/tooltip/#event-open" title="向下移动显示">open</a> 事件。</p>
43
 
44
 
45
</body>
46
</html>