• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Tooltip

Status
Für weitere Antworten geschlossen.

RaZ0oR

Neues Mitglied
Also, cih hab ja vom Thread "Kunstrasen...." diesen Link bekommen.
Hab das gleich mal ausprobiert ;)
PHP:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
  .tooltip {
        position:absolute;
        display:none;
}
</style>
</head>
<body>
<a href="http://google.de/" onmouseover="showTT('eins')" onmouseout="hideTT()">Google</a>    <div class="tooltip" id="eins">
Eine super suchmaschiene ;)
</div>
    <?php            
function showTT(id) {
  tooltip = document.getElementById(id)
        tooltip.style.display = 'block;'
}
document.onmousemove = posTT
function posTT(e) {
        x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX
        y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY
        if (tooltip != null) {
                tooltip.style.left = (x + 15) + "px;"
                tooltip.style.top = (y + 15) + "px;"
        }
}
function hideTT() {
  tooltip.style.display = 'none;'
}
?>
</body>
</html>
Aber er funkt nicht kommt immer
[code]
 
Parse error: syntax error, unexpected ')', expecting '&' or T_VARIABLE in **** on line 20
 
[/code]
Line 20 ist die zeile gleich unter <?php ;ugl


edit: also das problem hat scih gelöst
 
Zuletzt bearbeitet:
Status
Für weitere Antworten geschlossen.
Zurück
Oben