Hi
I have an image and some text that are both links (they are separated links..).
I want that on mouseover on the image, the text link will change its color.
How can I do it?
thanks!
Hi
I have an image and some text that are both links (they are separated links..).
I want that on mouseover on the image, the text link will change its color.
How can I do it?
thanks!
The image may be linked as well, makes no difference. I'd assume that onmouseout of the image though, you would want the link to revert:Code:<img src="whatever.jpg" onmouseover="document.getElementById('some_id').style.color='red';"> <a id="some_id" href="some.htm">Text</a>
The link's (some_id) initial color (if different than the default) should be set in a stylesheet.Code:<img src="whatever.jpg" onmouseover="document.getElementById('some_id').style.color='red';" onmouseout="document.getElementById('some_id').style.color='';">
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
lord22 (07-29-2008)
Can you please give me your code?
But what you'd want to do is either use CSS, or JavaScript.
Css: http://www.w3schools.com/css/css_pseudo_classes.asp
Javascript: http://www.w3schools.com/HTMLDOM/met...lementbyid.asp
Edit: I took a break in the middle of writing this post for food, guess John beat me.
Jeremy | jfein.net
Thank you very much!
Bookmarks