/    Sign up×
Community /Pin to ProfileBookmark

Image Swap and link color change on mouse hover

I have a set of text links ( 9 links), and corresponding image links.

I want the image to be highlighted with red border and the text link to change color to red whenevr mouse is hovered over either the text link or the image link.

Please see [url]http://www.huestechnologies.com/demo/rollover.html[/url] (text link does not highlight to red when mouse is over the text)
with a little change in code
[url]http://www.huestechnologies.com/demo/rollover2.html[/url] (text link does not highlight to red when mouse is over the image)

What I have done so far is that I can achieve three actions at a time.

Is there any simpler way to achieve this functionality when all the four actions take place with these links?

I am swapping images to create the red border around the images.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@netbuddyJun 11.2006 — I would imagine that you would be using javascript to set the style property of the image, you wouldnt need to swap the image just change one or two of the image tags propertys through javascript.
Copy linkTweet thisAlerts:
@phpnoviceJun 11.2006 — <a href="...url..." onmouseover="

this.style.color='red';

document.images['myimagename'].style.border='2px solid red';

return true;" onmouseout="

this.style.color='';

document.images['myimagename'].style.border='2px none white';

return true;">link text</a>
×

Success!

Help @hues spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...