Tuesday, 6 August 2013

Change image on click then back to original image on another image click

Change image on click then back to original image on another image click

I need some help changing an image on click then changing it back to the
original image when another image is clicked. All I have so far is
changing the image on the first click, but I don't know the next part,
that it goes back to the original image when ANOTHER image is clicked.
This is what I have:
$(function() {
$('#two').click(function(){
$("#imgtwo").attr('src',"resources/items/icon2blue.png");
});
});
Any help would be appreciated! Thanks!

No comments:

Post a Comment