PDA

View Full Version : permanently change color of text on mouseover



lakp
07-02-2005, 02:28 PM
hi, how can i get a piece of text to permanently change color after someone places their cursor over it once ...

ex.
"Blablablabla"
then ....
the surfer places his mouse over it and ...
the color permanently changes just once to "Blablablabla"

so basically, its not like a normal mouseover text change where every time you place the cursor over the text it changes to a different color and then when the cursor is removed from the text, it changes back to its normal color

here, as soon as the person places his cursor over it, i want it to change and never change back .....

all ideas will be appreciated ...
thank you

Twey
07-02-2005, 02:51 PM
<a href="..." onmouseover="this.style.color='#00ff00';">Text</a>
This will change the colour of the link and then never change it back, as there's no onMouseOut handler.

lakp
07-02-2005, 03:39 PM
it works fine, BUT, it has to be a link to work ....
how can it just be simple text and change color permanently?

lakp
07-02-2005, 03:45 PM
nevermind, i got it to work fine ........ thanx, i just made a fw adjustments to ur code
now it looks like:

<span onmouseover="this.style.color='#000033';">
text..... </span>

Twey
07-02-2005, 04:00 PM
Yes, it applies to any element.