Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Stefan Gabos  >  PHP JavaScript Tooltip Generator Class  >  examples/example1.php  >  Download  
File: examples/example1.php
Role: Example script
Content type: text/plain
Description: example scrips
Class: PHP JavaScript Tooltip Generator Class
Open tooltips over HTML page elements
Author: By
Last change:
Date: 2006-09-25 05:57
Size: 1,228 bytes
 

Contents

Class file image Download
<?php

    
// include the JavaScript tooltip generator class
    
require "../class.tooltips.php";

    
// instantiate the class
    
$tt = new tooltips();
    
?>
<html>
    <head>
        <title>PHP JavaScript Tooltip Generator Class</title>
    </head>
    <body>
    <?php

        
// set some properties for the tooltip
        // THIS MUST BE DONE BEFORE CALLING THE init() METHOD!
        
        // tell the tooltips to start fading in only after it have waited for one second
        
$tt->fadeInDelay 1000;
        
        
// see the manual for what other properties can be set!
        
        // notice that we init the tooltips in the <BODY> !
        
$tt->init();
    
?>
    
        <table style="width:100%;height:100%">
            <tr>
                <td align="center" valign="center">
                    <!--
                        notice that we're not setting the onmouseout event!
                        the script automatically takes care of it
                    -->
                    <input type="button" value="hover me!" onmouseover="<?=$tt->show("Hello World!")?>">
                </td>
            </tr>
        </table>
    
    </body>
</html>