Mouse over boble


InfoXHost Webhotell

Infolinx-no/web

 

 

Scriptet puttes mellom mellom HEAD-taggene:

<script type="text/javascript">
function showTip(tipText, bcolor, wwidth)
{
tipspace.style.visibility=''
tipspace.innerText=tipText
tipspace.style.backgroundColor=bcolor
tipspace.style.width=wwidth
}
function hideTip()
{
tipspace.style.visibility='hidden'
}
function currentPosition()
{
posY = event.y + 15

posX = event.x - 30
tipspace.style.top=posY+'px'
tipspace.style.left=posX+'px'
}
</script>

 

Style til boksene puttes mellom HEAD-taggene:
<style type="text/css">
#tipspace
{
position: absolute;
width: 100px;
font-family: verdana;
font-size: 10px;
border: 1px solid black;
padding: 2px;
background-color: silver;
visibility: show;
z-index: 1000;
}
</style>

 

I BODY-taggen må du putte en onload=:

<body onload="hideTip()">

 

Linkene lager du sånn:

<a href="http://adresse.com"
onmousemove="currentPosition()"
onMouseover="showTip('Tekst i boksen','gold', 300)"
onMouseout="hideTip()">
Linktekst</a>