Ergebnis 1 bis 6 von 6

Thema: tooltip menu

Baum-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #2
    Ich habs irgendwie nicht auf Giga gefunden aber ich denke du suchst sowas:

    HTML-Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <STYLE>
       .ttip {border:1px solid black;font-size:12px;layer-background-color:lightyellow;background-color:lightyellow}
      </STYLE>
    <script>
         var tip=new Array
               tip[0]='Blablabla!'
               tip[1]='lmlmlmlmlololol!'
               tip[2]='hehehe!'
               tip[3]='lol<br>grrrrrrrrrrrrr'
               
         function showtip(current,e,num)
            {
             if (document.layers) // Netscape 4.0+
                {
                 theString="<DIV CLASS='ttip'>"+tip[num]+"</DIV>"
                 document.tooltip.document.write(theString)
                 document.tooltip.document.close()
                 document.tooltip.left=e.pageX+14
                 document.tooltip.top=e.pageY+2
                 document.tooltip.visibility="show"
                }
             else
               {
                if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
                  {
                   elm=document.getElementById("tooltip")
                   elml=current
                   elm.innerHTML=tip[num]
                   elm.style.height=elml.style.height
                   elm.style.top=parseInt(elml.offsetTop+elml.offsetHeight)
                   elm.style.left=parseInt(elml.offsetLeft+elml.offsetWidth+10)
                   elm.style.visibility = "visible"
                  }
               }
            }
    function hidetip(){
    if (document.layers) // Netscape 4.0+
       {
        document.tooltip.visibility="hidden"
       }
    else
      {
       if(document.getElementById) // Netscape 6.0+ and Internet Explorer 5.0+
         {
          elm.style.visibility="hidden"
         }
      } 
    }
    </script>
    <body>
    <div id="tooltip" style="position:absolute;visibility:hidden;border:1px solid black;font-size:12px;layer-background-color:lightyellow;background-color:lightyellow;padding:1px"></div>
    
    <a href="http://www.milchbox.com" onMouseover="showtip(this,event,'0')" onMouseOut="hidetip()">Test</a>
    <br>
    <a href="http://www.milchbox.com" onMouseover="showtip(this,event,'1')" onMouseOut="hidetip()">Test</a>
    <br>
    <a href="http://www.milchbox.com" onMouseover="showtip(this,event,'2')" onMouseOut="hidetip()">Test</a>
    <br>
    <a href="http://www.milchbox.com" onMouseover="showtip(this,event,'3')" onMouseOut="hidetip()">Test</a></body></html>
    Man kanns ja noch abändern

    Edit: Jetzt hab ich verstanden
    Mit CSS geht das guck mal auf SelfHTML

    Geändert von Milchbox (05.01.2006 um 15:32 Uhr)

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •