Say for example I have two images called:-
<img alt="img-estate" src="images/estate.png" />
<img alt="img-saloon" src="images/saloon.png" />
On click of either of these images I want to be able to change the src to add -active
on click.
So if I click on #img-estate the image src should be images/estate-active.png
. So basically it reads the original src location and just adds -active
on click.
How would I go about doing this using jQuery?