I have to images and I'd like to switch the src attributes of the images, when one is clicked:
Before:
<img src="1.jpg" class="image1" />
<img src="2.jpg" class="image2" />
After clicking on image 1 or 2:
<img src="2.jpg" class="image1" />
<img src="1.jpg" class="image2" />
I can change the src of the clicked image, but I don't seem to be able to store the original src-attribute in any way to pass it to the other image.
Thanks!