Javascript / OnMouseover / The Simplest Tooltip
Very easy tool tip that will display a Tool Tip when mouseover on a link.
Browsers: IE5.0+ & NS4.xx & NS6.x
Browsers: IE5.0+ & NS4.xx & NS6.x
General Details
Snippet uploaded by: snippet
Email : webmaster@snippetlibrary.com
Snippet By: Unknown
<!---Head--->
<HTML><HEAD>
<SCRIPT language=JavaScript>
function showtip(current,e,text)
{
if (document.all)
{
thetitle=text.split('<BR>')
if (thetitle.length>1)
{
thetitles=''
for (i=0;i<thetitle.length;i++)
thetitles+=thetitle[i]
current.title=thetitles
}
else
{current.title=text}
}
else if (document.layers)
{
document.tooltip.document.write('<layer bgColor="white" style="border:1px solid black;font-size:12px;">'+text+'</layer>')
document.tooltip.document.close()
document.tooltip.left=e.pageX+5
document.tooltip.top=e.pageY+5
document.tooltip.visibility="show"
}
}
function hidetip()
{
if (document.layers)
document.tooltip.visibility="hidden"
}
</SCRIPT>
<STYLE type=text/css>
A {COLOR: blue; TEXT-DECORATION: none}
A:hover {COLOR: orange; TEXT-DECORATION: none}
</STYLE>
</HEAD>
<!---Body--->
<BODY>
<DIV id=tooltip style="VISIBILITY: hidden; POSITION: absolute"></DIV>
<A href="link.html" onmouseover="showtip(this,event,'this is a working tooltip')" onmouseout=hidetip()>Run your mouse over here !!!</a>
</BODY>
</HTML>
No Reviews to show
