Changing an image src
Changing an image src
Hey All,
I have the following code
- <img src="/filename.ext" id="homeimg" width="623" height="410" alt="" />
Under it i also have the following
- <ul class="moreimages">
- <li><a href="/more-image-button.png"><img src="/image.png" alt="" /></a></li>
- <li><a href="/more-image-button.png"><img src="/image.png" alt="" /></a></li>
- </ul>
What i want to be able to do, is when someone clicks a link, it changes the main image src to the href of the link if that makes sense.
So, when someone clicks a link the image tag changes to <img src="/more-image-button.png" id="homeimg" ... />
Cheers,