/    Sign up×
Community /Pin to ProfileBookmark

Changing image link depending on iamge press

Slightly confusing title but basically… I have a website, when I click on an image I want it to change the destination of a link.

When I click image1, image2 changes. I have a link just below Image2 which I want to change its destination depending on what image Image2 is showing.

Hopefully that’s not too confusing, any idea how to do this?

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@emtwMar 13.2012 — This would be accomplished using javascript - you can use JS to change parts of a stylesheet and you can also change the html of an element.
×

Success!

Help @aLlamaWithARifl 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...