Wednesday, February 22, 2012

How do I change a word on a website using mouseover ?

I am designing a website for a translator friend and want the ability to change a word when the mouse hovers over it. For example, when I hover over the word 'house' I want it to change to 'maison' but without changing colour or size. Can anyone help me find the javascript or other code needed for this ?How do I change a word on a website using mouseover ?
There are many different methods for doing this, using DIVS to display just over the text is one option....



OnMouseover="YourScript('Variable')" OnMouseOut="YourScriptOut()" etc



You could use %26lt;span alt="maison" title="maison"%26gt;home%26lt;/span%26gt; which would not change the word but display the French for it once they hover over the word.



Or perhaps



%26lt;font id="translate" onmouseover="translate.innerText='masion鈥?onmouseout="translate.innerText='home'"%26gt;鈥?br>

No comments:

Post a Comment