tipsy | 設置サンプル

例:基本的なツールチップ

テキスト

例:東西南北方向にツールチップ表示

北方向  南方向  東方向  西方向

例:フェード効果付きでツールチップ表示

テキスト

設置サンプルのソース

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta http-equiv="Content-Language" content="ja" />
      <meta http-equiv="Content-Script-Type" content="text/javascript" />
      <meta http-equiv="Content-Style-Type" content="text/css" />
      <meta http-equiv="imagetoolbar" content="no" />
      <title>tipsy | 設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <!-- CSS -->
      <link rel="stylesheet" type="text/css" href="/content/lib/jquery/tipsy/tipsy.css" />
      <!-- JS -->
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
      <script src="/content/lib/jquery/jquery.tipsy.js" type="text/javascript"></script>
      <script type='text/javascript'>
         $(function() {
            $('.tips').tipsy();
            $('.north').tipsy({gravity: 'n'});
            $('.south').tipsy({gravity: 's'});
            $('.east').tipsy({gravity: 'e'});
            $('.west').tipsy({gravity: 'w'});
            $('.fadetips').tipsy({fade: true});
      });
      </script>
   <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
   <body style="width:600px; margin:0 auto;">
      <div id="wrap">
         <h1><a href='http://onehackoranother.com/projects/jquery/tipsy/'>tipsy</a> | 設置サンプル</h1>
<!-- CODE -->
         <h2>例:基本的なツールチップ</h2>
         <p><a class='tips' href='#' title='ツールチップの内容'>テキスト</a></p>

         <h2>例:東西南北方向にツールチップ表示</h2>
         <a class='north' href='#' title='ツールチップの内容'>北方向</a> 
         <a class='south' href='#' title='ツールチップの内容'>南方向</a> 
         <a class='east' href='#' title='ツールチップの内容'>東方向</a> 
         <a class='west' href='#' title='ツールチップの内容'>西方向</a>

         <h2>例:フェード効果付きでツールチップ表示</h2>
         <p><a class='fadetips' href='#' title='ツールチップの内容'>テキスト</a></p>

<!-- CODE / -->
      </div>
   </body>
</html>