src/cm/media/js/lib/tipsy/docs/index.html
changeset 0 40c8f766c9b8
equal deleted inserted replaced
-1:000000000000 0:40c8f766c9b8
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       
     2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     3 
       
     4 <html>
       
     5   <head>
       
     6     <title>
       
     7       tipsy              - Facebook-style tooltip plugin for jQuery          </title>
       
     8     <meta name="description" content="" />
       
     9     <meta name="keywords" content="" />
       
    10     <script type='text/javascript' src='jquery-1.2.3.min.js'></script>
       
    11 	      <script type='text/javascript' src='jquery.tipsy.js'></script>
       
    12         <link rel="stylesheet" href="zero.css" type="text/css" />
       
    13     <link rel="stylesheet" href="project-page.css" type="text/css" />
       
    14           <link rel="stylesheet" href="tipsy.css" type="text/css" />
       
    15           <link rel="stylesheet" href="tipsy-docs.css" type="text/css" />
       
    16           </head>
       
    17   <body>
       
    18     <div id='container'>
       
    19     
       
    20       <h1>
       
    21         tipsy                  <span class='subtitle'> - Facebook-style tooltip plugin for jQuery</span>
       
    22               </h1>
       
    23       
       
    24       <div id='sidebar'>
       
    25       
       
    26                   <ul id='project-nav'>
       
    27                           <li><a href='index.html#overview'>Overview</a></li>
       
    28                           <li><a href='index.html#examples'>Examples & Usage</a></li>
       
    29                           <li><a href='index.html#download'>Download</a></li>
       
    30                           <li><a href='index.html#todo'>TODO</a></li>
       
    31                       </ul>
       
    32                 
       
    33         <ul id='ohoa-nav'>
       
    34                     <li><a href='http://onehackoranother.com/projects/'>Back to projects &raquo;</a></li>
       
    35           <li><a href='http://onehackoranother.com/'>Back to onehackoranother.com &raquo;</a></li>
       
    36         </ul>
       
    37       
       
    38 		<a href='http://thepixeltrap.com' id='pixel-trap' title='The Pixel Trap: New Directory for Web Professionals'>
       
    39 		  <img src='pixel-16.png' alt='' /> The Pixel Trap - A New Directory for Web Professionals
       
    40 		</a>
       
    41         
       
    42         	
       
    43       </div>
       
    44       <div id='main'>
       
    45         
       
    46 
       
    47 <script type='text/javascript'>
       
    48   $(function() {
       
    49     
       
    50     $('#example-1').tipsy();
       
    51     
       
    52     $('#north').tipsy({gravity: 'n'});
       
    53     $('#south').tipsy({gravity: 's'});
       
    54     $('#east').tipsy({gravity: 'e'});
       
    55     $('#west').tipsy({gravity: 'w'});
       
    56     
       
    57     $('#example-fade').tipsy({fade: true});
       
    58     
       
    59   });
       
    60 </script>
       
    61 
       
    62 <h2 class='first' id='overview'>Overview</h2>
       
    63 
       
    64 <p>Tipsy is a jQuery for creating a Facebook-like tooltips effect based on
       
    65 an anchor tag's title attribute.</p>
       
    66 
       
    67 <h2 id='examples'>Examples &amp; Usage</h2>
       
    68   
       
    69 <h3>Basic</h3>
       
    70 
       
    71 <p>By default, tooltips will appear centred underneath their anchor:</p>
       
    72 
       
    73 <p>
       
    74 	<a id='example-1' href='index.html#' title='Hello World'>Hover over me</a>
       
    75 </p>
       
    76 
       
    77 <div class='caption'>Basic example:</div>
       
    78 <pre class='code'>$('#example-1').tipsy();</pre>
       
    79 
       
    80 <h3>Gravities</h3>
       
    81 
       
    82 <p>Using the gravity parameter, it's possible to control the positioning of the tooltip relative to the pointee:</p>
       
    83 
       
    84 <table id='gravity' cellspacing='5'>
       
    85   <tr>
       
    86     <td>
       
    87       <a id='north' href='index.html#' title='This is an example of north gravity'>North</a>
       
    88     </td>
       
    89     <td>
       
    90       <a id='south' href='index.html#' title='This is an example of south gravity'>South</a>
       
    91     </td>
       
    92   </tr>
       
    93   <tr>
       
    94     <td>
       
    95       <a id='east' href='index.html#' title='This is an example of east gravity'>East</a>
       
    96     </td>
       
    97     <td>
       
    98       <a id='west' href='index.html#' title='This is an example of west gravity'>West</a>
       
    99     </td>
       
   100   </tr>
       
   101 </table>
       
   102 
       
   103 <div class='caption'>Gravity example:</div>
       
   104 <pre class='code'>$('#foo').tipsy({gravity: 'n'}); // n | s | e | w</pre>
       
   105 
       
   106 <h3>Fading</h3>
       
   107 
       
   108 <p>For full Wob2.0 compliance, you must fade these badboys in:</p>
       
   109 
       
   110 <p>
       
   111 	<a id='example-fade' href='index.html#' title='Hello World'>Hover over me</a>
       
   112 </p>
       
   113 
       
   114 <div class='caption'>Fade example:</div>
       
   115 <pre class='code'>$('#example-fade').tipsy({fade: true});</pre>
       
   116 
       
   117 <h3>Bonus Feature</h3>
       
   118 
       
   119 <p>You can EVEN COMBINE FADE AND GRAVITY! (exercise for reader)</p>
       
   120 
       
   121 <h2 id='download'>Download</h2>
       
   122 
       
   123 <h3>Package</h3>
       
   124 
       
   125 <p>
       
   126   Package downloads are available from the
       
   127   <a href='http://plugins.jquery.com/project/tipsy'>jQuery project page</a>.
       
   128 </p>
       
   129 
       
   130 <h3>github</h3>
       
   131 <pre class='shell'><span class='green'>jason@donut</span> <span class='blue'>~ $</span> git clone git@github.com:jaz303/tipsy.git</pre>
       
   132 
       
   133 <h2 id='todo'>TODO</h2>
       
   134 <ul class='todo'>
       
   135   <li>Automatically select gravity based on position of pointee in viewport</li>
       
   136 </ul>
       
   137 
       
   138       
       
   139       </div>
       
   140     </div>
       
   141   </body>
       
   142 </html>