Ciao, sono nuovo di qui e devo chiedere un consiglio:
sto cercando di creare una pagina dove ci sono 3 pulsanti e quando si passa sopra appare del testo sotto. sono riuscito a farlo per uno, ma non so come duplicare l'effetto per gli altri due. chi mi può aiutare (probabilmente è un problema stupido, ma di javascript ne so proprio poco)?

il codice è questo:

<div id="buttons">
<div class="inlinea on">
<script type="text/javascript">

var button="1"

function showtext(thetext1){
if (!document.getElementById)
return
textcontainerobj=document.getElementById("tabledes cription1")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(button)
document.getElementById("tabledescription1").inner HTML=thetext1
highlighting=setInterval("gradualfade(textcontaine robj)",50)
}

function hidetext(){
cleartimer()
instantset(button)
}

function instantset(degree){
if (browserdetect=="mozilla")
textcontainer1obj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && button=="1")
document.getElementById("tabledescription1").inner HTML=""
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.sty le.MozOpacity)+0.2, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=20
else if (window.highlighting)
clearInterval(highlighting)
}

</script>
<a href="index.html" onMouseover="showtext('Home')" onMouseout="hidetext()">
<div id="button1" ></div>
</a>
</div>
<div class="inlinea off">
<a href="portfolio.html" onMouseover="showtext('Portfolio')" onMouseout="hidetext()">
<div id="button2"></div>
</a>
</div>
<div class="inlinea off" onMouseover="showtext('Social')" onMouseout="hidetext()">
<a href="social.html">
<div id="button3"></div></div>
</a>
</div>

<div id="tabledescription1"></div>

</div>